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
 
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 IBEGENER RETURN CODE 12 anilkumar922 All Other Mainframe Topics 5 Wed Dec 13, 2017 11:41 am
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts Finding the plan when code compiled u... Ahemad DB2 1 Fri Dec 01, 2017 6:38 pm
No new posts Strange Code amitc23 COBOL Programming 6 Tue Nov 28, 2017 11:25 am
No new posts Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am

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