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

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Thu Sep 04, 2008 3:07 pm
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
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: 2481
Location: @my desk

PostPosted: Thu Sep 04, 2008 3:16 pm
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
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: 1287
Location: Chennai, India

PostPosted: Tue Sep 09, 2008 4:37 pm
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: 8797
Location: Welsh Wales

PostPosted: Tue Sep 09, 2008 4:40 pm
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: 1287
Location: Chennai, India

PostPosted: Tue Sep 09, 2008 4:45 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
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 Return codes-Normal & Abnormal te... JCL & VSAM 7
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