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
 

 

Setting RETURN-CODE in JCL based on some condition...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
dineshsjce
Currently Banned

New User


Joined: 16 Apr 2007
Posts: 41
Location: Bangalore

PostPosted: Thu Sep 04, 2008 3:05 pm    Post subject: Setting RETURN-CODE in JCL based on some condition...
Reply with quote

Hi Freinds,

I have a requirement where in I have to set the RETURN-CODE in JCL based on some condition as given below.

IF the column 4-6 in the file is GU00059.TEST.FILE3 equal to = 134
SET MAXCC = 0
ELSE SET MAXCC = 4


Is there any way we can meet this requirement ?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Sep 04, 2008 3:07 pm    Post subject:
Reply with quote

For only one record ?

Look at REXX or possibly SORT or COBOl or any other program language solutions.
Back to top
View user's profile Send private message
dineshsjce
Currently Banned

New User


Joined: 16 Apr 2007
Posts: 41
Location: Bangalore

PostPosted: Thu Sep 04, 2008 3:09 pm    Post subject: Reply to: Setting RETURN-CODE in JCL based on some conditio
Reply with quote

YES. Only one record....

Thanks for replying icon_biggrin.gif
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2181
Location: @my desk

PostPosted: Thu Sep 04, 2008 3:16 pm    Post subject:
Reply with quote

Dinesh,

You can use the below syncsort job for one record..
Code:
//STEP1    EXEC PGM=SORT,PARM='NULLOUT=RC4'
//SYSOUT   DD SYSOUT=*                     
//SORTIN   DD *                           
XXX134YYY                                 
//SORTOUT  DD SYSOUT=*                     
//SYSIN    DD *                           
 OPTION COPY                               
 INCLUDE COND=(4,3,CH,EQ,C'134')           

Thanks,
Arun
Back to top
View user's profile Send private message
dineshsjce
Currently Banned

New User


Joined: 16 Apr 2007
Posts: 41
Location: Bangalore

PostPosted: Thu Sep 04, 2008 7:39 pm    Post subject: Reply to: Setting RETURN-CODE in JCL based on some conditio
Reply with quote

Thanks a lot Arun !!!!
It is working and the problem is solved!!
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Sep 09, 2008 4:37 pm    Post subject: Reply to: Setting RETURN-CODE in JCL based on some conditio
Reply with quote

Arun,

Quote:
PARM='NULLOUT=RC4'


Could you please explain me the significance of the above statement and how this can be used for the requirement?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Sep 09, 2008 4:40 pm    Post subject:
Reply with quote

If there are no records in the SORTOUT dataset, then the step will issue RC4, but if there are records RC0
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Sep 09, 2008 4:45 pm    Post subject: Reply to: Setting RETURN-CODE in JCL based on some conditio
Reply with quote

Hi,

Quote:
If there are no records in the SORTOUT dataset, then the step will issue RC4, but if there are records RC0


Thanks a lot for the explanation.
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 MAX-RC 88 and Return code 606 in DFH0... lind sh CICS 1 Tue Jan 24, 2017 1:23 pm
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am


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