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
 

 

JCL to Verify Empty datsets

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

New User


Joined: 12 May 2006
Posts: 49
Location: India

PostPosted: Wed Aug 07, 2013 3:53 pm    Post subject: JCL to Verify Empty datsets
Reply with quote

Hi ,

I have a Requirement to verify lot of datasets whether its empty or not , If its Empty we need to populate a message to output dataset saying this particular dataset is empty

Thanks
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Wed Aug 07, 2013 4:19 pm    Post subject:
Reply with quote

JCL cannot do this, of course; you'll need a program -- one that you have written or a utility. Do you have a preference?
Back to top
View user's profile Send private message
raj4neo
Warnings : 1

New User


Joined: 12 May 2006
Posts: 49
Location: India

PostPosted: Wed Aug 07, 2013 4:33 pm    Post subject:
Reply with quote

Program or utility anything is fine

Could you please share
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: Wed Aug 07, 2013 4:36 pm    Post subject:
Reply with quote

And are there any particular formats of dataset to be considered here, KSDS, ESDS, PDS, PS, DA, SAS ............ et al

You want to insert a record into the dataset saying that the dataset is empty ?
Back to top
View user's profile Send private message
raj4neo
Warnings : 1

New User


Joined: 12 May 2006
Posts: 49
Location: India

PostPosted: Wed Aug 07, 2013 4:42 pm    Post subject:
Reply with quote

All the datasets are PS Formats ,

say i have 5 datasets and out of which 1 datasets are empty means ,

Example:
1st dataset name : aaa.bbb
2nd dataset name : ccc.ddd -> empty dataset
3rd dataset name : eee.fff
4th dataset name : ggg.hhh
5th dataset name : iii.jjj

Output dataset should have a message

ccc.ddd is empty
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: Wed Aug 07, 2013 4:49 pm    Post subject:
Reply with quote

Which output dataset are you talking about. Are you talking about a dataset completely different to those being tested, or are you suggesting that each empty dataset is then populated with a record saying that it is empty.

I would also be interested in knowing why you, or anyone else, would want this information.

Also you have not answered my question about dataset formats being interogated.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7905
Location: Bellevue, IA

PostPosted: Wed Aug 07, 2013 5:05 pm    Post subject:
Reply with quote

raj4neo, what you want to do may not be possible. For example, if these files are VSAM KSDS files that have never had a record in them, you cannot open them for input or I-O and hence you could not determine that they are empty via a program.

Furthermore, I find the original premise very suspect -- in a well-designed system there would never be a question about whether a particular file (or files) is (are) empty since the well-designed system simply would process either way.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Wed Aug 07, 2013 5:13 pm    Post subject:
Reply with quote

Robert Sample wrote:
For example, if these files are VSAM KSDS files that have never had a record in them, you cannot open them for input or I-O and hence you could not determine that they are empty via a program.


Is that necessarily the case? Could not one trap the file status and determine that the data set is uninitialized (as distinct from merely empty)?
Back to top
View user's profile Send private message
raj4neo
Warnings : 1

New User


Joined: 12 May 2006
Posts: 49
Location: India

PostPosted: Wed Aug 07, 2013 5:29 pm    Post subject:
Reply with quote

All the datasets i need to verify empty are PS ( Sequential datasets ) ,
NO VSAM datasets

Lot of Sequential datasets are coming from a vendor through File transfer , Now we are manually checking what are all empty datasets and sending a email to them saying these are empty ..

So our aim is to if we have a any job which can identify empty datasets and Write that dataset name in another dataset
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Wed Aug 07, 2013 5:35 pm    Post subject:
Reply with quote

Just curious why dont you check the empty file and set the return code to non-Zero and trigger a mail
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Aug 07, 2013 5:38 pm    Post subject: Reply to: JCL to Verify Empty datsets
Reply with quote

unfortunately the topic belongs to the category ...

Topics Not Eligible to Discuss in our Forum
http://ibmmainframes.com/viewtopic.php?t=20820&highlight=

item ...
How to check for empty dataset/file. This topic has already been posted many times. Please search for the answer that best suits your needs.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed Aug 07, 2013 5:43 pm    Post subject:
Reply with quote

9 ways to check empty file
- Credits to Stefan
https://docs.google.com/document/d/1MwkNFN0eH6mmhjAArAFTPg0uOUFcZPu2RvzPV1T2Amw/edit
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 PDSFAST VERIFY - What does it really ... shetttigarvivek JCL & VSAM 1 Tue Nov 29, 2016 9:21 am
No new posts Truncated error message after VERIFY ... David Sde TSO/ISPF 4 Mon Sep 05, 2016 11:26 pm
This topic is locked: you cannot edit posts or make replies. how to find if file is empty or not. abdulrafi DFSORT/ICETOOL 5 Tue May 17, 2016 4:39 pm
No new posts Empty KSDS Files Jeenu Bajaj JCL & VSAM 6 Fri Aug 21, 2015 2:44 pm
No new posts Empty excel attachment in mail receiv... gs185008 COBOL Programming 8 Mon Jul 13, 2015 7:45 pm


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