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 UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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