IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Setting Return-Code when dataset is empty


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Salini

New User


Joined: 11 Oct 2006
Posts: 3

PostPosted: Wed Oct 17, 2007 6:37 pm
Reply with quote

I have to check if a file is empty and have to make the return code as zero if it is empty. I have used the following code, but the final return-code is coming as 12. I want to set the return-code to 0 if the file is empty.

Code:

//step1    EXEC PGM=ICETOOL             
//IN       DD  DSN=HLQ.EXCPTION,DISP=SHR     
//TOOLMSG  DD SYSOUT=*                                 
//DFSMSG   DD SYSOUT=*                                 
//TOOLIN   DD DSN=&LIB1(HB701S1),DISP=SHR               
//*
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Oct 17, 2007 7:11 pm
Reply with quote

Salini,

Quote:
//TOOLIN DD DSN=&LIB1(HB701S1),DISP=SHR

What does the member HB701S1 contain? Please remeber without seeing the actual sortcard no one can help.

PS: Check dfsort forum. this had been discussed earlier many times.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Oct 17, 2007 10:09 pm
Reply with quote

Salini,

The TOOLIN data set should have this control statement to get what you asked for:

Code:

COUNT FROM(IN) NOTEMPTY 


In the future, please show all of the control statements you use. We can't read your mind to figure out what's in your PDS member.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
Search our Forums:

Back to Top