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
 

 

How to get the last Referenced date for Migrated Dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: How to get the last Referenced date for Migrated Dataset
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: 1445
Location: Azeroth

PostPosted: Fri May 15, 2015 6:16 pm    Post subject:
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    Post subject: Reply to: How to get the last Referenced date for Migrated Dataset
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: 641
Location: Whitby, ON, Canada

PostPosted: Wed May 20, 2015 5:22 pm    Post subject:
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    Post subject: Reply to: How to get the last Referenced date for Migrated Dataset
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: 1445
Location: Azeroth

PostPosted: Thu May 21, 2015 2:29 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm


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