Page 1 of 1

Change the retun code using DFSort.

Posted: Thu Oct 01, 2015 2:54 pm
by Ninand Pa
Hi,

We have a job which has a file-aid step. With this sep we'd check if the input is empty. If the file is empty the job gives back a return code of 8. We need to chage this job to a sort job.

I tested the same functionality with DFSORT with an empty file but it gave me a return code of 0. To get over it we used NULLOFL=RC4 but it did not allow NULLOFL=RC8. Then how can I do it, please help.

Re: Change the retun code using DFSort.

Posted: Thu Oct 01, 2015 5:48 pm
by William Collins
Change the test of the CC/RC to 0 or 4 or 16, or continue with File-Aid or just give up.

Re: Change the retun code using DFSort.

Posted: Thu Oct 01, 2015 6:14 pm
by Anuj Dhawan
Hi William,

Can't we use this, if ICETOOL is a choice. I'm just 'out of work' so can't really test it.

Code: Select all

//STEP01 EXEC PGM=ICETOOL 
//TOOLMSG  DD SYSOUT=*      
//DFSMSG   DD SYSOUT=*      
//IN       DD DSN=input empty file, 
//            DISP=SHR 
//TOOLIN   DD * 
  COUNT FROM(IN) EMPTY RC8 
//*

Re: Change the retun code using DFSort.

Posted: Thu Oct 01, 2015 6:52 pm
by William Collins
Yes, if another step added is OK (or if the entire code can be subsumed within a USING of COUNT in some dummied-up manner) but it would be more efficient in that case to use IDCAMS to do the setting. Have the RC4 set off the IDCAMS which then sets to 8 which then sets off (or not) the original next (or not) step.

So, not really in this case.

Re: Change the retun code using DFSort.

Posted: Thu Oct 01, 2015 7:33 pm
by Anuj Dhawan
Make sense. I was just thinking too much about 'sortcentric' solution! :)