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
 

 

COND Code in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: COND Code in JCL
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: 1703
Location: Australia

PostPosted: Fri Nov 20, 2009 10:23 am    Post subject:
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

Site Director


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

PostPosted: Fri Nov 20, 2009 10:38 am    Post subject:
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: 1703
Location: Australia

PostPosted: Fri Nov 20, 2009 10:42 am    Post subject:
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: 401
Location: Mumbai

PostPosted: Fri Nov 20, 2009 9:24 pm    Post subject:
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    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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts CA Workload Automation event code help vinu78 CA Products 10 Wed Mar 01, 2017 10:05 am
No new posts MAX-RC 88 and Return code 606 in DFH0... lind sh CICS 2 Tue Jan 24, 2017 1:23 pm
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 2 Thu Jan 12, 2017 12:02 pm


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