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
 

 

Pass Return code of a JCL if JCL abends

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
usharaniA

New User


Joined: 22 Jan 2008
Posts: 85
Location: India

PostPosted: Thu Jun 04, 2009 12:48 pm    Post subject: Pass Return code of a JCL if JCL abends
Reply with quote

Hi,

I want to set the Return code of a step when the JCL abends,
From the forum i found that it is not posiible to set the RC once it is executed.

But i want to pass a parm to a Rexx code if the JCL abends .
Can you please tell me how to do that .
For eg. if my Jcl is ,

Code:
//STEP2 EXEC PGM=COBPGM1                             
//STEPLIB DD DISP=SHR,DSN=Userid.LOADLIBV.VALIDTR   
//DD1 DD DISP=SHR,DSN=Userid.A1.PS                   
//DD2 DD DISP=SHR,DSN=Userid.TOOLS.VALIDTR.TEMP     
//SYSPRINT DD SYSOUT=*                               
//SYSOUT DD SYSOUT=*                                 
//TEST2  IF (ABEND | STEP2.RC > 8 | RC < 8) THEN     


If the Job abends should i use any SET statement and pass it to REXX code.
If so how to do that.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Thu Jun 04, 2009 12:53 pm    Post subject: Reply to: Pass Return code of a JCL if JCL abends
Reply with quote

use an if group only for the abend
Back to top
View user's profile Send private message
usharaniA

New User


Joined: 22 Jan 2008
Posts: 85
Location: India

PostPosted: Thu Jun 04, 2009 1:05 pm    Post subject:
Reply with quote

can you please elaborate.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 04, 2009 1:12 pm    Post subject:
Reply with quote

Can you please go to the JCL reference manual by using the "IBM Manuals" button at the top of any page, and read all about it.
Back to top
View user's profile Send private message
usharaniA

New User


Joined: 22 Jan 2008
Posts: 85
Location: India

PostPosted: Thu Jun 04, 2009 3:30 pm    Post subject:
Reply with quote

can you please tell me how to code If... else... in the SYSIN statement,
Because its giving me the following error in the SPOOL.
Code:
READY                                               
   IF (STEP2.ABEND | STEP2.RC > 8 | RC < 8) THEN   
IKJ56500I COMMAND IF NOT FOUND                     
READY                                               
   ISPSTART CMD(%JUA2  08) NEWAPPL(BAT)             


My JCL SYSIN statement is:
Code:
//SYSTSIN  DD   *                                     
   IF (STEP2.ABEND | STEP2.RC > 8 | RC < 8) THEN       
   ISPSTART CMD(%JUA2  08) NEWAPPL(BAT)               
   ELSE ISPSTART CMD(%JUA2  00) NEWAPPL(BAT)           
   ENDIF                                               
                                                       
/*                                                     
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 04, 2009 3:38 pm    Post subject:
Reply with quote

expat wrote:
Can you please go to the JCL reference manual by using the "IBM Manuals" button at the top of any page, and read all about it.

These are JCL statements, not REXX or TSO ...........................
Back to top
View user's profile Send private message
usharaniA

New User


Joined: 22 Jan 2008
Posts: 85
Location: India

PostPosted: Thu Jun 04, 2009 3:47 pm    Post subject:
Reply with quote

Sorry i got the ouput I coded as follows,
Code:
//TEST2   IF (ABEND | STEP2.RC > 8 | RC < 8) THEN       
//LASTSTEP EXEC PGM=IKJEFT01,COND=EVEN                 
//ISPPROF  DD DSN=&&ISPPROF,DISP=(,PASS),               
//            UNIT=SYSDA,SPACE=(CYL,(1,1,10),RLSE),     
//            RECFM=FB,LRECL=80                         
//ISPPLIB  DD   DSN=ISP.SISPPENU,DISP=SHR               
//ISPMLIB  DD   DSN=ISP.SISPMENU,DISP=SHR               
//ISPSLIB  DD   DSN=ISP.SISPSENU,DISP=SHR               
//ISPTLIB  DD   DSN=ISP.SISPTENU,DISP=SHR               
//SYSEXEC  DD   DISP=SHR,DSN=U162936.TOOLS.VALIDTR.PDS 
//SYSTSPRT DD   SYSOUT=*                               
//SYSTSIN  DD   *                                       
   ISPSTART CMD(%JUA2  12) NEWAPPL(BAT)                 
/*                                                     
//         ELSE                                         
//LASTSTEP EXEC PGM=IKJEFT01,COND=EVEN                 
//ISPPROF  DD DSN=&&ISPPROF,DISP=(,PASS),               
//            UNIT=SYSDA,SPACE=(CYL,(1,1,10),RLSE),     
//            RECFM=FB,LRECL=80                         
//ISPPLIB  DD   DSN=ISP.SISPPENU,DISP=SHR               
//ISPMLIB  DD   DSN=ISP.SISPMENU,DISP=SHR               
//ISPSLIB  DD   DSN=ISP.SISPSENU,DISP=SHR               
//ISPTLIB  DD   DSN=ISP.SISPTENU,DISP=SHR               
//SYSEXEC  DD   DISP=SHR,DSN=U162936.TOOLS.VALIDTR.PDS 
//SYSTSPRT DD   SYSOUT=*                               
//SYSTSIN  DD   *                                       
   ISPSTART CMD(%JUA2  0) NEWAPPL(BAT)         
                                               
/*                                             
//ENDTEST2 ENDIF                               
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts EXIT or RETURN cvnlynn CLIST & REXX 9 Wed Jul 19, 2017 2:50 am
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am


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