Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Utility to check the data existance in a data-set

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests
View previous topic :: :: View next topic  
Author Message
chkiran2

New User


Joined: 24 Jun 2004
Posts: 24
Location: Gurgoan

PostPosted: Tue Jun 29, 2004 9:13 am    Post subject: Utility to check the data existance in a data-set
Reply with quote

icon_question.gif Hi
I an interview I have faced they asked me to tell the name of the IBM utilty which takes only one input i.e. the data set name (PS) and lets us know whether the data-set is empty or not. They told it is not IEBCOMPR by comparing it with a dummy data-set.

Is there any utility to do this. If so how to use that and also please tell whether the same is applicable to PDS.

Thank you,
Back to top
View user's profile Send private message

imvs

New User


Joined: 12 May 2004
Posts: 33

PostPosted: Tue Jun 29, 2004 12:47 pm    Post subject:
Reply with quote

Its print and punch utility

It sets RC=0000 if data set contains records
It sets RC=0004 if it is empty
example :

Code:

         //STEP1      EXEC PGM=IEBPTPCH         
         //SYSUT1    DD DSN=input daaset
         //                   DISP=SHR               
         //SYSUT2    DD DUMMY                   
         //SYSPRINT DD SYSOUT=*               
         //SYSIN      DD *                       
           PRINT                               
         //*
 


you can also use iDCAMS or ICETOOL to find out empty dataset
Back to top
View user's profile Send private message
chkiran2

New User


Joined: 24 Jun 2004
Posts: 24
Location: Gurgoan

PostPosted: Tue Jun 29, 2004 3:09 pm    Post subject: Thanks but more clarification
Reply with quote

Hi
Thanks for the answer. But I am asked that I should not use SYSUT2 DD at all and also told it is not IDCAMS. For that only one DSN is passed I mean SYSUT1.
Back to top
View user's profile Send private message
imvs

New User


Joined: 12 May 2004
Posts: 33

PostPosted: Tue Jun 29, 2004 3:27 pm    Post subject:
Reply with quote

Code:
//STEP1 EXEC PGM=ICETOOL                               
//TOOLMSG  DD SYSOUT=*               
//DFSMSG    DD SYSOUT=*               
//IN       DD DSN=input file,DISP=SHR
//TOOLIN DD *
  COUNT FROM(IN) EMPTY
//*

RC=0 if data set contains records
Rc=12 if data set is empty
Back to top
View user's profile Send private message
chandana_msc

New User


Joined: 28 Mar 2007
Posts: 7
Location: hyderabad

PostPosted: Fri May 11, 2007 3:22 pm    Post subject:
Reply with quote

Can this utility be used for more than two datasets.If so,how?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri May 11, 2007 3:24 pm    Post subject:
Reply with quote

[code]Can this utility be used for more than two datasets.If so,how?[/quote]
You would have to execute the step for EVERY dataset that you wish to check.
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 -> HomeWorks & Requests All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us