View previous topic :: View next topic
|
Author |
Message |
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 96 Location: Delhi
|
|
|
|
I was reading the manual to get the properties of file.
I tried to write a piece of code from that but I think I am dng something wrong which I am not able to trace. Can someone help.
I want to pull creation data of GDG file.
ZDSCDATE Creation date (National format) Character 10
This is the field I found somewhere which contains creation date.
Code: |
/******** REXX **********/
DSN = 'ABCD.DRFB.G3145V00'
ADDRESS ISPEXEC DSINFO DATASET(DSN)
CALL ISPLINK('DSINFO ',DSN);
|
Can someone guide on this |
|
Back to top |
|
|
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 96 Location: Delhi
|
|
|
|
I remodified the code as below.
Code: |
/******** REXX **********/
LVL="ABCD.DRFB.G3145V00"
"ISPEXEC LMDINIT LISTID(TMPID) LEVEL("LVL")"
I=0
DO FOREVER
"ISPEXEC LMDLIST LISTID("TMPID") OPTION(LIST) DATASET(DSVAR) STATS(YES)"
IF RC = 0 THEN DO
SAY ZDLCDATE
END
ELSE LEAVE
END
"ISPEXEC LMDLIST LISTID("TMPID") OPTION(FREE)"
EXIT
|
But since this dataset is in migrated state , I am not getting Creation date.
Any suggestions ?? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Instead of LMDLIST, try the LISTDSI builtin function of rexx. It has a RECALL / NORECALL parameter. See the REXX Reference manual. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
I think LISTDSI and DSINFO will recall migrated datasets and then provide the DS information.
Even if we specify NORECALL for LISTDSI it will not process the migrated dataset and will fail with
"DFHSM migrated the data set. NORECALL prevents retrieval."
In this case to get creation date, LISTC would be optimal since it will not recall migrated dataset,
some parsing of the LISTC output might be necessary.
Code: |
DSN = "WELLS.SORTOUT"
X=OUTTRAP(LST.)
" LISTC ENT('"DSN"') ALL"
X=OUTTRAP(OFF)
DO I = 1 TO LST.0
SAY LST.I
END
EXIT |
Hope it helps. |
|
Back to top |
|
|
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 96 Location: Delhi
|
|
|
|
Thanks a lot. It works like a champ |
|
Back to top |
|
|
|