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
 

 

how to check that the data set created in a empty or not

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ursprasanna
Warnings : 2

New User


Joined: 15 May 2006
Posts: 20
Location: chennai

PostPosted: Wed May 17, 2006 6:10 pm    Post subject: how to check that the data set created in a empty or not
Reply with quote

I have a small clarification...

A data set is created in the first step and after that some process is done

in the second step i want to know whether the data set is empty or non empty .

How could i check this .

thanks,
Prasanna subramaniam.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed May 17, 2006 6:14 pm    Post subject: Re: how to check that the data set created in a empty or not
Reply with quote

This same topic was just discussed yesterday:

http://www.ibmmainframes.com/viewtopic.php?t=11061
Back to top
View user's profile Send private message
vijayamadhuri

Active User


Joined: 06 Apr 2005
Posts: 180

PostPosted: Wed May 17, 2006 7:17 pm    Post subject: Re: how to check that the data set created in a empty or not
Reply with quote

Hi,
To see that the data set is empty or not u have to just browse the dataset if it contains data or not
Back to top
View user's profile Send private message
Nidhi_Bansal

New User


Joined: 17 May 2006
Posts: 4
Location: Noida

PostPosted: Wed May 17, 2006 7:26 pm    Post subject: Re: how to check that the data set created in a empty or not
Reply with quote

There are two ways,you can run step 1 and
1. manually check the dataset.
2. Run the job from step 2 after checking it for any syntactic errors.
Back to top
View user's profile Send private message
srikm

New User


Joined: 19 May 2006
Posts: 4

PostPosted: Fri May 19, 2006 8:24 pm    Post subject:
Reply with quote

Hi

Run a IDCAMS utility

//step01 EXEC PGM=IDCAMS
//*
//INFILE DD DSN=KM.km.km,
// DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PRINT INFILE(INFILE) COUNT(1)
/*
//

If RC =0 -> means dataset not empty


This will definately work


KMsrinivas
09880191795
Back to top
View user's profile Send private message
callkris_cit

New User


Joined: 22 Apr 2006
Posts: 44

PostPosted: Thu Jun 01, 2006 2:44 pm    Post subject: Re: how to check that the data set created in a empty or not
Reply with quote

Hi,

To check a Particular dataset is empty, try to copy that file in to another output dataset using FILEAID utility.

If it gives the return code 8 then the dataset is empty.


Thanks
Suresh
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: Thu Jun 01, 2006 8:58 pm    Post subject:
Reply with quote

See the following Smart DFSORT Trick for information on using DFSORT/ICETOOL to check for an empty data set:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst03.html#t10
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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 0 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
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


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