Set REXX RC based on a field value



IBM's Command List programming language & Restructured Extended Executor

Set REXX RC based on a field value

Postby nkulkarni » Mon Oct 19, 2015 10:52 pm

Hi,

I'm executing a REXX program PROGRAM1 as below

//*
//TSOBATCH EXEC PGM=IKJEFT1A,DYNAMNBR=200,PARM='PROGRAM1'               
//SYSPROC  DD   DISP=SHR,DSN=ABC.DEF.GHI                       
//SYSTSPRT DD   DISP=(NEW,KEEP,DELETE),                                 
//         DSN=ABC.DEF.GHI.TSOBATCH.REXX.OUTPUT,                   
//         SPACE=(TRK,(50,20),RLSE),                                   
//         BLKSIZE=27951,RECFM=FB,LRECL=121,DSORG=PS                   
//SYSTSIN  DD   DUMMY                                                   
//*         


in REXX program PROGRAM1, I have a field called RCSTEP.

I need to set the return code of the JCL STEP "TSOBATCH" to 01 if the field RCSTEP contains values anything other than 00 or 98 or 99.

If RCSTEP contains values 00 or 98 or 99 then return code of JCL STEP "TSOBATCH" should be 00.

Could anyone please help me with this one?
NK
nkulkarni
 
Posts: 52
Joined: Mon Sep 28, 2015 2:28 pm
Has thanked: 17 times
Been thanked: 0 time

Re: Set REXX RC based on a field value

Postby prino » Mon Oct 19, 2015 11:08 pm

myrc.   = 1
myrc.00 = 0
myrc.98 = 0
myrc.99 = 0

exit myrc.rcstep

SIASD!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy

These users thanked the author prino for the post:
nkulkarni (Tue Oct 20, 2015 2:01 am)
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: Set REXX RC based on a field value

Postby nkulkarni » Mon Oct 19, 2015 11:41 pm

Thank You Prino
NK
nkulkarni
 
Posts: 52
Joined: Mon Sep 28, 2015 2:28 pm
Has thanked: 17 times
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post