I think there is also another option, like below //STEP1 EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //IN DD DISP=SHR,DSN=YOUR.DATASET //TOOLIN DD * * SET RC=12 IF THE 'IN' DATA SET IS EMPTY, OR * SET RC=0 IF THE 'IN' DATA SET IS NOT EMPTY COUNT FROM(IN) EMPTY /*
Best Regards Ituriel do Nascimento Neto z/OS System Programmer Em quinta-feira, 9 de novembro de 2023 às 13:18:44 BRT, Sri h Kolusu <skol...@us.ibm.com> escreveu: >> If the input file has no records to process, I would like to set a return >> code so I can bypass further processing. Is there a way that I can tweak >> this SORT input that you gave me to know if the SORTCMD1 file is empty, and >> set a CC for the step? Don, Yes, we can set a return code if the file is empty. Cameron has the right idea of using NULLOUT, however it will NOT work in your case as you are using OUTFIL processing. So, the parm you need to use is NULLOFL. So, change this statement OUTFIL BUILD=(1,133) To OUTFIL BUILD=(1,133),NULLOFL=RC4 This will set RC=4 when the input file is EMPTY. Thanks, Kolusu DFSORT Development IBM Corporation ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN