IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Attributes of File


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 96
Location: Delhi

PostPosted: Tue Apr 03, 2012 11:45 pm
Reply with quote

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
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 96
Location: Delhi

PostPosted: Wed Apr 04, 2012 12:03 am
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Wed Apr 04, 2012 12:42 am
Reply with quote

Instead of LMDLIST, try the LISTDSI builtin function of rexx. It has a RECALL / NORECALL parameter. See the REXX Reference manual.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Wed Apr 04, 2012 12:58 am
Reply with quote

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
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 96
Location: Delhi

PostPosted: Wed Apr 04, 2012 8:53 am
Reply with quote

Thanks a lot. It works like a champ icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top