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
 

 

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 Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm


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