MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Return Code from SORT step

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Wed Aug 09, 2006 8:21 am    Post subject: Return Code from SORT step Reply with quote

I have Something like this

Code:
//STEP5  EXEC PGM=SORT                               
//SORTIN DD  DSN=FILE.SORT, DISP=SHR             
//SORTOUT  DD  SYSOUT=*                             
//SYSOUT   DD  SYSOUT=*                             
//SYSIN    DD  DSN *
   SORT FIELDS=COPY                   
   INCLUDE COND=(416,1,CH,EQ,C'U')
//*     


I Should execute another step ONLY IF the Sort utility finds a Character U in the specified position. To achieve this how should I intepret the Return Code from the SORT step?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Aug 09, 2006 8:32 am    Post subject: Reply with quote

sakreg,

Please search before posting.

Code:

//*********************************************************************
//*  SETS RC=0000 IF DATASET HAS RECORDS                              *
//*  SETS RC=0004 IF DATASET IS EMPTY                                 *
//*********************************************************************
//STEP0100 EXEC  PGM=SORT,PARM='NULLOUT=RC4'   
//SYSOUT   DD SYSOUT=*                         
//SORTIN   DD DSN=YOUR FILE IN QUESTION,
//            DISP=SHR   
//SORTOUT  DD DUMMY                         
//SYSIN    DD *                                 
 SORT FIELDS=COPY       
 INCLUDE COND=(016,1,CH,EQ,C'U')                         
/*


which is explained in here

http://www.mvsforums.com/helpboards/viewtopic.php?t=5319

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Thu Aug 10, 2006 1:17 am    Post subject: Reply with quote

Thanks Mate, I was going wrong as I missed PARM='NULLOUT=RC4' and every time I get a RC of 0 whether the SORT step picks the records or does not picks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group