View previous topic :: View next topic
Author
Message
valadezm New User Joined: 05 May 2006Posts: 7
Hello.
I am doing a syncsort copy using JCL below
Code:
/SORTEXTR EXEC PGM=SYNCSORT
/*-----------------------------------------------
/SYSOUT DD SYSOUT=*
/SYSUDUMP DD SYSOUT=*
/*
/SORTIN DD DSN=AFSMAV.PRICECHK,
/ DISP=OLD
/*
/SORTOUT DD DSN=AFSMAV.PRICECHK.D2,
/ DISP=(NEW,CATLG,DELETE),
/ UNIT=SYSDA,
/ SPACE=(TRK,(15,15),RLSE),
/ DCB=(RECFM=FBA,LRECL=133,BLKSIZE=0)
/SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(10,2,CH,EQ,C'NO QUEUE RECORDS')
The problem is that even though the condition is not met, syncsort is still giving me a code 0 on the step. I only want the code=0 when the records are found. As it stands now, if the data is not found, it still creates an empty dataset and gives a code=0.
I want it to give a different code if it's not successful.
Back to top
CICS Guy Senior Member Joined: 18 Jul 2007Posts: 2146 Location: At my coffee table
I'm not aware of Syncsort's ability to set return codes upon record count.
I think an additional step with IDCAMS could provide you with what you need.
Do you need a pointer to the utility?
Back to top
superk Global Moderator Joined: 26 Apr 2004Posts: 4652 Location: Raleigh, NC, USA
Did you try the NULLOUT parameter:
Code:
//SORTEXTR EXEC PGM=SYNCSORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=AFSMAV.PRICECHK,DISP=OLD
//SORTOUT DD DSN=AFSMAV.PRICECHK.D2,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(15,15),RLSE),
// RECFM=FBA
//SYSIN DD *
OPTION COPY,NULLOUT=RC4
INCLUDE COND=(10,16,CH,EQ,C'NO QUEUE RECORDS')
/*
Back to top
CICS Guy Senior Member Joined: 18 Jul 2007Posts: 2146 Location: At my coffee table
superk wrote:
Did you try the NULLOUT parameter
Thanks for that....
SyncSort for z/OS 1.3 Programmer’s Guide
Chapter 5. PARM Options wrote:
NULLOUT= RC0 /RC4 /RC16 Specifies the action to be taken when SORTOUT contains no records.
Back to top
valadezm New User Joined: 05 May 2006Posts: 7
superk wrote:
Did you try the NULLOUT parameter:
Code:
//SORTEXTR EXEC PGM=SYNCSORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=AFSMAV.PRICECHK,DISP=OLD
//SORTOUT DD DSN=AFSMAV.PRICECHK.D2,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(15,15),RLSE),
// RECFM=FBA
//SYSIN DD *
OPTION COPY,NULLOUT=RC4
INCLUDE COND=(10,16,CH,EQ,C'NO QUEUE RECORDS')
/*
Thanks! Worked like a charm.
Back to top
Please enable JavaScript!