View previous topic :: View next topic |
Author |
Message |
sakreg Beginner
Joined: 28 Feb 2005 Posts: 80 Topics: 26
|
Posted: Wed Aug 09, 2006 8:21 am Post subject: Return Code from SORT step |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Wed Aug 09, 2006 8:32 am Post subject: |
|
|
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 |
|
|
sakreg Beginner
Joined: 28 Feb 2005 Posts: 80 Topics: 26
|
Posted: Thu Aug 10, 2006 1:17 am Post subject: |
|
|
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 |
|
|
|
|