MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

question on blank file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Anand_123
Beginner


Joined: 20 Mar 2007
Posts: 2
Topics: 1

PostPosted: Sat Mar 31, 2007 6:27 am    Post subject: question on blank file Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Sat Mar 31, 2007 7:45 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Anand_123
Beginner


Joined: 20 Mar 2007
Posts: 2
Topics: 1

PostPosted: Tue Apr 03, 2007 11:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Wed Apr 04, 2007 2:01 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Wed Apr 04, 2007 8:26 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed Apr 04, 2007 8:51 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Apr 04, 2007 11:01 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group