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

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Wed May 17, 2006 6:14 pm
Reply with quote

This same topic was just discussed yesterday:

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
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
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
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
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 Developer


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

PostPosted: Thu Jun 01, 2006 8:58 pm
Reply with quote

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

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
Search our Forums:

Back to Top