Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1531
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: 658
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: 1531
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 Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us