View previous topic :: View next topic
|
Author |
Message |
raj4neo Warnings : 1 New User
Joined: 12 May 2006 Posts: 51 Location: India
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
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 |
|
|
raj4neo Warnings : 1 New User
Joined: 12 May 2006 Posts: 51 Location: India
|
|
|
|
Program or utility anything is fine
Could you please share |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
raj4neo Warnings : 1 New User
Joined: 12 May 2006 Posts: 51 Location: India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
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 |
|
|
raj4neo Warnings : 1 New User
Joined: 12 May 2006 Posts: 51 Location: India
|
|
|
|
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 |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Just curious why dont you check the empty file and set the return code to non-Zero and trigger a mail |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
unfortunately the topic belongs to the category ...
Topics Not Eligible to Discuss in our Forum
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
Back to top |
|
|
|