Page 1 of 2

Rexx to extract sequential dataset basis particular d & t

PostPosted: Wed May 20, 2020 5:09 pm
by arya_starc
Hi All,

My requirement is to extract all the sequential datasets which is created between some particular time window on particular day.

Example - If the production batch is run daily then I need to extract all the datasets which is created between 12am - 3am of my system time.

Challenge here is that how I can pass this time constraint to my rexx utility. Any suggestion will be helpful.

Thanks.

Re: Rexx to extract sequential dataset basis particular d &

PostPosted: Wed May 20, 2020 5:22 pm
by enrico-sorichetti
wondering what additional information You might be hiding ...

why do You think that
parse arg
cannot be used ?

Re: Rexx to extract sequential dataset basis particular d &

PostPosted: Wed May 20, 2020 5:34 pm
by arya_starc
Hi Enrico,

I am not getting if I pass the system date and time in my rexx utility then and how in rexx program determine the existing sequential date and time.
This is show stopper as of now to me.

Re: Rexx to extract sequential dataset basis particular d &

PostPosted: Wed May 20, 2020 6:10 pm
by enrico-sorichetti
what happened when You searched the forum with "dataset creation date time" ?

Re: Rexx to extract sequential dataset basis particular d &

PostPosted: Wed May 20, 2020 7:13 pm
by steve-myers
The time of day a data set was created is not a data set attribute. It is not stored in the data set label.

Re: Rexx to extract sequential dataset basis particular d &

PostPosted: Wed May 20, 2020 9:29 pm
by willy jensen
The only place I'm aware of where the time of dataset creation is recorded is in the SMF record type 61, assuming that the dataset is cataloged too. As steve-meyers correctly says, it is not in the DSCB in the VTOC, nor is it in the catalog entry.

Re: Rexx to extract sequential dataset basis particular d &

PostPosted: Wed May 20, 2020 11:26 pm
by sergeyken
The author is concerned about the only one simple problem:
Challenge here is that how I can pass this time constraint to my rexx utility. Any suggestion will be helpful.

Enrico gave the whole explanation of this issue.

So far, there is no need to investigate DSCB, or catalog, or SMF records, or whatever else.

Re: Rexx to extract sequential dataset basis particular d &

PostPosted: Wed May 20, 2020 11:30 pm
by willy jensen
Well, yes, but later the OP adds
how in rexx program determine the existing sequential date and time

So I was confused as to what the issue really is.

Re: Rexx to extract sequential dataset basis particular d &

PostPosted: Thu May 21, 2020 3:06 am
by sergeyken
willy jensen wrote:Well, yes, but later the OP adds
how in rexx program determine the existing sequential date and time

So I was confused as to what the issue really is.

The term “existing sequential(?) date and time” does recall the “current date and time”, but not “dataset creation/reference/update/... date and time”

Re: Rexx to extract sequential dataset basis particular d &

PostPosted: Thu May 21, 2020 5:38 am
by Pedro
I think you need to look at SMF data for the time period in question. It should give you the name. Perhaps it is field SMF61ENM from record type 61. I think you need to get some test data to verify.
Given the name, you can issue LISTDSI in rexx to determine if it is a sequential data set.

See here: https://www.ibm.com/support/knowledgece ... ecords.htm

Note: you probably do not have access to read SMF data, so ask for permission first.