Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Job abending with S322

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
umasankarmf

New User


Joined: 08 Sep 2008
Posts: 43
Location: india

PostPosted: Tue Jul 14, 2009 10:12 am    Post subject: Job abending with S322
Reply with quote

Hi all,

I have a requirement like, need to read a sequential file and then compare one of the field with table, if matches write the table record into output sequential file.

Code:
 PERFORM UNTIL WS-EOF = 'Y'                             
    READ ITEM-FILE INTO WS-ITEM-RECORD                   
        AT END MOVE 'Y' TO WS-EOF                       
     NOT AT END                                         
               MOVE UPC-NBR     TO Host_variable1  (Declare cursor where cond. variable)
           MOVE DIVNN-NBR   TO Host_variable2 (Declare cursor where cond. variable)
           Open cursor
            Fetch cursor untill end of the table
                If sqlcode=0, then Write into output file
            close cursor
     END-READ                                             
 END-PERFORM.                 



Can any one help me

Thanks in advance

Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj
Back to top
View user's profile Send private message

Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Tue Jul 14, 2009 10:32 am    Post subject:
Reply with quote

Hi Umasankar,

What help do u want from us ??
You have mentioned ur requirement... you have given a sample code... now... what is your issue... icon_rolleyes.gif
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Jul 14, 2009 10:57 am    Post subject:
Reply with quote

Hi,

I think the question is in the subject matter

Quote:
----------------- V=IBM P=Z/OS SYSTEM CODES R=V1R7 I=S322 -------------------
******************** Text Below Copyright (c) 2009, IBM *********************
322

Explanation: One of the following occurred:

o The system took a longer time to run a job, job step, or procedure
than the time specified in one of the following:

- The TIME parameter of the EXEC or JOB statement

- The standard time limit specified in the job entry subsystem

o For a started task under the master subsystem, the TIME parameter was
not specified on the PROC statement of the catalogued procedure, and
the PPT entry did not indicate a system task

System Action: The system abnormally ends the job, job step, or
procedure.

Application Programmer Response: If the TIME parameter was not specified
on the PROC statement of the catalogued procedure, add the TIME parameter
or add a PPT entry for the PGM parameter. Otherwise, check for program
errors. If none exist, specify a longer time in the TIME parameter. Then
run the job again.



Gerry
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Jul 14, 2009 11:01 am    Post subject:
Reply with quote

The way you have posed your question, you left a very little room to get an answer from the Froum.

Per your subject line, S322 is explained in manuals as shown below:
Quote:
322

Explanation: One of the following occurred:

o The system took a longer time to run a job, job step, or procedure than the time specified in one of the following:

- The TIME parameter of the EXEC or JOB statement
- The standard time limit specified in the job entry subsystem

o For a started task under the master subsystem, the TIME parameter was not specified on the PROC statement of the catalogued procedure, and the PPT entry did not indicate a system task

System Action: The system abnormally ends the job, job step, or procedure.

Application Programmer Response: If the TIME parameter was not specified on the PROC statement of the catalogued procedure, add the TIME parameter or add a PPT entry for the PGM parameter. Otherwise, check for program errors. If none exist, specify a longer time in the TIME parameter. Then run the job again.


Suggest you post the sysout from the failed job -- that may help.
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Tue Jul 14, 2009 11:21 am    Post subject:
Reply with quote

Hi Umasankar,

I am a little curious regarding your logic. From what i have understood from your first post is that ultimately u just want to verify whether a particular record ( read from the sequential file ) is there in the table or not.

Isn't it possible to just read the table with the key ( SELECT )... rather than opening ... fetching ... and closing cursors.. which is rather a large overhead compared to simple SELECT statement....
Back to top
View user's profile Send private message
umasankarmf

New User


Joined: 08 Sep 2008
Posts: 43
Location: india

PostPosted: Tue Jul 14, 2009 12:58 pm    Post subject:
Reply with quote

Hi all,

thanks for your reply.

Binop,
I have mutiple records whixh satisfies the WHERE condition. So that only I am using cursor.

I have given the max time limit in time parameter. Still I am getting the Abend.

Anyone can please tell me, any other logic to overcome this issue?

Thanks in advance
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Tue Jul 14, 2009 1:19 pm    Post subject:
Reply with quote

Hi Umasankar,

Could we see a snapshot of your JCL - the particular step and Job card.
Would like to see how the TIME parameter is specified.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7990
Location: Bellevue, IA

PostPosted: Tue Jul 14, 2009 3:02 pm    Post subject:
Reply with quote

Quote:
I have given the max time limit in time parameter. Still I am getting the Abend.

Anyone can please tell me, any other logic to overcome this issue?
Contact your site support group and them help you put this job in the right job class. You may be running in a job class that does not allow enough time for your job to complete.

You may also want to arrange a code walkthrough with your peers to verify that there are no infinite loops in your code. Infinite loops are the most common cause of S322 abends. Using an execution analysis tool, if one is available at your site, could also help you identify why your code is running for so long.
Back to top
View user's profile Send private message
umasankarmf

New User


Joined: 08 Sep 2008
Posts: 43
Location: india

PostPosted: Tue Jul 14, 2009 7:12 pm    Post subject:
Reply with quote

Hi all,

Thanks for your replies.

I fixed the abend. Now my code is working fine.

thanks a lot........!
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Wed Jul 15, 2009 6:33 am    Post subject:
Reply with quote

Hi Umasankar,

Can u plz update us on what u did to correct the abend.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts PL/I - IMS DB program abending while ... mistah kurtz IMS DB/DC 4 Thu Apr 25, 2013 12:41 pm
No new posts CICS program abending with ASRA Vijay_reddy CICS 16 Fri Oct 19, 2012 10:24 am
No new posts S322 Abend while acessing a KSDS file. PeterHolland PL/I & Assembler 10 Mon Aug 13, 2012 11:52 am
No new posts DFSORT Abending with message - SORT C... ganeshprasanna DFSORT/ICETOOL 5 Thu Nov 17, 2011 12:37 am
No new posts Program not abending with S0C7 dilip_bangalore COBOL Programming 8 Sat Oct 01, 2011 11:23 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us