IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

COND Code in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
CHANDAN KAPOOR

New User


Joined: 12 Apr 2008
Posts: 36
Location: NOIDA

PostPosted: Fri Nov 20, 2009 10:17 am
Reply with quote

Hi ,

I have requirement like

S6 EXEC PGM=DFSRRC00,COND=((4,GT,S2),(5,LT,S2)),
PARM='BMP,TER000,&PSB,&IN,,N00020,,1,,,,,,IMS&VS,,DB2C'

I need to convert this cond code to the IF ENDIF clause in JCL, I want to make sure that I have used the If clause as
IF (S2.RC > 4 OR S2.RC < 5) THEN

Is this the correct if cluase instead of the above COND clause.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Nov 20, 2009 10:23 am
Reply with quote

Hi,

there is nothing better that actually testing it yourself.


Gerry
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Nov 20, 2009 10:38 am
Reply with quote

Hello,

To make testing this kind of thing really simple, suggest you create a little program that uses a parm of 4 digits and sets the condition code to whatever value you want to test. To set multiple step conditions, run the program multiple times setting whatever condition codes are needed for the test.

Then you don't need any data files to test the return code processing icon_smile.gif
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Nov 20, 2009 10:42 am
Reply with quote

Hi,

you can use IDCAMS to set cond codes.



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

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Fri Nov 20, 2009 9:24 pm
Reply with quote

IDCAMS seems to have a max maxcc of 16. For larger retcodes, you can use a one line rexx exec named SETRC
Code:
 Return arg(1)
called as
Code:
//RC17     EXEC PGM=IRXJCL,PARM='SETRC 17'   
//SYSEXEC  DD  DISP=SHR,DSN=your.pds.containing.setrc
//SYSTSIN  DD  DUMMY                         
//SYSTSPRT DD  DUMMY
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top