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

How to get the last Referenced date for Migrated Dataset


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
swathykrishnan

New User


Joined: 01 Oct 2010
Posts: 43
Location: Bangalore

PostPosted: Fri May 15, 2015 5:58 pm
Reply with quote

Hi All,

Currently I am using
Code:
X=LISTDSI(DSN RECALL)
to get the properties of dataset.
But the problem occurs when the dataset is migrated to tape. When we check the last referenced date given by LISTDSI for migrated datasets, it will give us the current date.
Is there any way to find out the last referenced date of a migrated dataset?
Or is it possible to identify on which day the the dataset has been migrated?

Thanks in Advance
Swat
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Fri May 15, 2015 6:16 pm
Reply with quote

Invoke HLIST command in REXX.

The TSO comamnd is

tso hlist dsn('MIGRATED DATASET NAME') term mcds

Output:
Code:
DSN=MIGRATED DATASET NAME                         MIGVOL=xxxxxx DSO=PO  SDSP=NO
  LAST REF=15/01/16 MIG=15/04/28 TRKS=0000009 2K BLKS= ******* TIMES MIG= 00001
  16K BLKS=000001  LAST MIGVOL=*NONE*



LAST REF=15/01/16
MIG=15/04/28

Hope it helps.
Back to top
View user's profile Send private message
swathykrishnan

New User


Joined: 01 Oct 2010
Posts: 43
Location: Bangalore

PostPosted: Wed May 20, 2015 4:36 pm
Reply with quote

Hi Vasanth,

Thanks a lot for the info.

I tried to outtrap the message in rexx.The commond got executed but no result is captured in the stem variable.
Code:

trace r                                             
address tso                                         
X=OUTTRAP(DET.)                                     
 "hlist dsname('USSERID.TEST.DSN.XXXX') MCDS"
X=OUTTRAP(OFF)                                       
do i = 1 to det.0                                   
say det.i                                           
end                                                 
exit   


Is there any other way to capture the result?
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Wed May 20, 2015 5:22 pm
Reply with quote

Try the following command on any ISPF command line: TSO HELP HLIST. Pay particular attention to the OUTDATASET option and you will see a way to get what you want.
Back to top
View user's profile Send private message
swathykrishnan

New User


Joined: 01 Oct 2010
Posts: 43
Location: Bangalore

PostPosted: Wed May 20, 2015 6:08 pm
Reply with quote

Thanks Don,

I tried to write it to outdsn and read the file. So my requirement is fullfilled.
see the code below.
Code:
address tso                                                         
 "hlist dsname(MYDSN) MCDS",               
 " OUTDATASET(OUTDSN)"                             
                                                                     
"ALLOC F(INDD) DS(OUTDSN) shr reuse"               
 "EXECIO * DISKR INDD (FINIS STEM REP."                             
 "FREE F(INDD)"                                                                           
PARSE VAR rep.6 DDNAME VOLNAME L_REFDATE MIG_DATE TRKS_ALLOC DSORG .


This seems little bit tricky.. if you come across any other simple solution please let me know.

Once again Thanks a lot Vasanth & Don....
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Thu May 21, 2015 2:29 am
Reply with quote

Hello,
Glad you figured out the solution. I am not aware of any other way to get details about a migrated dataset without recalling it. I guess hlist is your best bet.
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
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 Need to convert date format DFSORT/ICETOOL 20
Search our Forums:

Back to Top