View previous topic :: View next topic
|
Author |
Message |
swathykrishnan
New User
Joined: 01 Oct 2010 Posts: 43 Location: Bangalore
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
swathykrishnan
New User
Joined: 01 Oct 2010 Posts: 43 Location: Bangalore
|
|
|
|
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 |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
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 |
|
|
swathykrishnan
New User
Joined: 01 Oct 2010 Posts: 43 Location: Bangalore
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
|