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

Dataset 'last referenced' date - retrievable through batch?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ian carter

New User


Joined: 18 May 2010
Posts: 3
Location: UK

PostPosted: Tue May 18, 2010 9:05 pm
Reply with quote

The ISPF 0.3.4 Dataset List Utility returns, amongst other information, the date a file was last referenced. I want to compile a file of 1,000+ datasets including this info. Does anyone know whether this can be returned via a batch job (utility etc)?
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Tue May 18, 2010 10:21 pm
Reply with quote

Whatever you select to list on the 3.4 screen can be saved into a flat file by using the SAVE primary command - e.g. SAVE mylist ( where the extended DSN will be YourUserId.mylist.DATASETS ( .MEMBERS for a panel showing a member list for a PDS ).
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 19, 2010 11:25 am
Reply with quote

DCOLLECT records contain this data
Back to top
View user's profile Send private message
ian carter

New User


Joined: 18 May 2010
Posts: 3
Location: UK

PostPosted: Wed May 19, 2010 12:43 pm
Reply with quote

Brilliant, thanks. I'd used SAVE followed by LIST to see the SPF* dataset it saved to, but even if I extended this d/s, it truncated.
This works perfectly.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed May 19, 2010 9:56 pm
Reply with quote

ian carter wrote:
but even if I extended this d/s, it truncated.
pardon me but what this could possibly mean?
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu May 20, 2010 4:59 am
Reply with quote

Quote:
but even if I extended this d/s,it truncated. This works perfectly.

Anuj said
Quote:
pardon me but what this could possibly mean?

Who knows, but it worked perfectly. icon_eek.gif
Back to top
View user's profile Send private message
ian carter

New User


Joined: 18 May 2010
Posts: 3
Location: UK

PostPosted: Thu May 20, 2010 12:49 pm
Reply with quote

Anuj - for your info... when you use the SAVE command followed by the LIST, you get three options (Print & delete/delete/Keep existing dataset). If you take option 3 to save, ISPF writes this to a dataset whose record length is held in the ISPF settings (I'm not going into detail of how you find that). You can change the record length, but for some reason ISPF will only write the first 120 bytes of the data from the SAVE (ie truncates).
But, as MMWIFE rightly states, who cares because the top solution works perfectly.
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Thu May 20, 2010 6:36 pm
Reply with quote

Hi Ian,

Can you please explain this eloborately? Like where did you use SAVE & LIST commands (i.e in a batch job). If possible, can you please provide step by step procedure. If you have JCL, can you plesae post it?

Cheers
Agni
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu May 20, 2010 6:40 pm
Reply with quote

Agni wrote:
Can you please explain this eloborately? Like where did you use SAVE & LIST commands (i.e in a batch job). If possible, can you please provide step by step procedure. If you have JCL, can you plesae post it?
Go to ISPF 3.4, give some wild card search, e.g. yourID.**, on command line SAVE LIST - all the listed DSNs would be saved in "yourID.LIST.DATASETS". This is lready stated in this thread. icon_neutral.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu May 20, 2010 6:59 pm
Reply with quote

ian carter wrote:
Anuj - for your info... when you use the SAVE command followed by the LIST, you get three options (Print & delete/delete/Keep existing dataset). If you take option 3 to save, ISPF writes this to a dataset whose record length is held in the ISPF settings (I'm not going into detail of how you find that). You can change the record length, but for some reason ISPF will only write the first 120 bytes of the data from the SAVE (ie truncates).
That means you just issue LIST and hits enter, once in ISPF 3.4. If you do so, you got those three options and file, listing the DSNs, will be of nature 121/FBA.

Instead, if you issue "SAVE LIST" on command line in ISPF 3.4, your data will be saved right-away without bothering about the "what to choose on next panel" and the file, which will list the DSNs, will be, typically, of LRECL 140, with name "yourID.LIST.DATASETS".

Hope this helps.
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Fri May 21, 2010 5:26 pm
Reply with quote

Yes Anuj, it did. Thanks a bunch for your explanation.

But i can't think where these details might be used.

Cheers
Agni
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri May 21, 2010 5:44 pm
Reply with quote

You're welcome.

That depends on programmer, what s/he wants to with the data they have. There are times when you need them.
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 Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
Search our Forums:

Back to Top