View previous topic :: View next topic |
Author |
Message |
Anand_123 Beginner
Joined: 20 Mar 2007 Posts: 2 Topics: 1
|
Posted: Sat Mar 31, 2007 6:27 am Post subject: question on blank file |
|
|
Hi,
we have a file-aid step in JCL, if the Input file is empty then it returns RC=8.
Can i get RC = 0 even if input file is empty.
I know we can do it by reseting parameters to file-aid. Any other solution possible thru file-aid control cards itself ??
Let me know
Thanks |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Sat Mar 31, 2007 7:45 am Post subject: |
|
|
Anand_123,
As you already mentioned FILE-AID cannot issue zero return code without passing the overririding the parms . you can use sort to set the code to zero.
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Anand_123 Beginner
Joined: 20 Mar 2007 Posts: 2 Topics: 1
|
Posted: Tue Apr 03, 2007 11:45 pm Post subject: |
|
|
how do we set RC = 0 in sort; also does that confirm that there is no way to get it done in file-aid |
|
Back to top |
|
|
vkphani Intermediate
Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
Posted: Wed Apr 04, 2007 2:01 am Post subject: |
|
|
Anand_123 wrote: | how do we set RC = 0 in sort; also does that confirm that there is no way to get it done in file-aid |
You can set the return code using IDCAMS.
Code: | //S2 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
IF LASTCC NE 0 THEN
SET MAXCC=0
/* |
Your first may be the FILEAID step. |
|
Back to top |
|
|
Bill Dennis Advanced
Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Wed Apr 04, 2007 8:26 am Post subject: |
|
|
IDCAMS can set the CCODE for its own step only, not the MAXCC for the whole job. _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed Apr 04, 2007 8:51 am Post subject: |
|
|
Anand_123 wrote: | how do we set RC = 0 in sort; also does that confirm that there is no way to get it done in file-aid |
Anand_123,
You can set the code to 0 in file-aid provided that you override the installation default parms. If you are NOT willing to do that then yes you cannot set the return code to 0 using fileaid.
Here is a sort step that will set the return code to zero as sort doesn't really distinguish between empty files or files with data
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=your input empty file,disp=shr
//SORTOUT DD DUMMY
//SYSIN DD *
SORT FIELDS=COPY
/*
|
_________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Frank Yaeger Sort Forum Moderator
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Wed Apr 04, 2007 11:01 am Post subject: |
|
|
Quote: | sort doesn't really distinguish between empty files or files with data |
Actually, z/OS DFSORT V1R5 does distinguish between empty files and files with data via the NULLOUT parameter. The shipped default is NULLOUT=RC0 which gives RC=0 whether the file is empty or not. However, NULLOUT=RC4 or NULLOUT=RC16 can be used to give RC=4 or RC=16, respectively, if the output file is empty. These can be set as the installation default for the site or used for individual applications. In addition, NULLOFL can be specifeid on individual OUTFIL statements. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort |
|
Back to top |
|
|
|
|