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 Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am


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