Page 1 of 1

Can we set RC dependent on number of records?

PostPosted: Tue Nov 05, 2013 2:00 pm
by xyzabc
Hi,

Can we modify the follwing piece of code :-

//SORT1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Input.File,DISP=SHR
//SORTOUT DD DSN=Output.File,...
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=OUT,TRAILER1=(1:COUNT),REMOVECC,NODETAIL
/*

so that the Return Code of step SORT1 is not zero when count is less or equal to two ?

Re: Can we set RC dependent on number of records?

PostPosted: Tue Nov 05, 2013 4:38 pm
by NicC
Your post has been split as you should not be tagging onto an old post and your requirement is somewhat different.

Now, what does your manual say?

Re: Can we set RC dependent on number of records?

PostPosted: Tue Nov 05, 2013 5:02 pm
by Akatsukami
xyzabc wrote:Hi,

Can we modify the follwing piece of code :-

//SORT1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Input.File,DISP=SHR
//SORTOUT DD DSN=Output.File,...
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=OUT,TRAILER1=(1:COUNT),REMOVECC,NODETAIL
/*

so that the Return Code of step SORT1 is not zero when count is less or equal to two ?

Have you searched the *sort fora for NULLOFL?

Re: Can we set RC dependent on number of records?

PostPosted: Tue Nov 05, 2013 7:19 pm
by xyzabc
Thanks for all the help. I used the following Code :-

//JS020 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=WELLS.SORTIN
//SYSOUT DD SYSOUT=*
//TOOLIN DD *
COUNT FROM(SORTIN) LOWER(1500) RC4
/*
//SYSUDUMP DD SYSOUT=*
/*