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: 1473
Location: Chennai

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: 647
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: 1473
Location: Chennai

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 Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am


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