Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10326
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 Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts I want to retire TRX and use only Rex... Abhinav Sharma CLIST & REXX 6 Sat Jul 29, 2017 2:53 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us