Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Setting Return-Code when dataset is empty

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Setting Return-Code when dataset is empty
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: 1439
Location: Bangalore,India

PostPosted: Wed Oct 17, 2007 7:11 pm    Post subject:
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 Moderator


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

PostPosted: Wed Oct 17, 2007 10:09 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us