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
 

 

Attributes of File

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Tue Apr 03, 2012 11:45 pm    Post subject: Attributes of File
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: 90
Location: Chennai

PostPosted: Wed Apr 04, 2012 12:03 am    Post subject: Reply to: Attributes of File
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

Senior Member


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

PostPosted: Wed Apr 04, 2012 12:42 am    Post subject: Reply to: Attributes of File
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: 1475
Location: Chennai

PostPosted: Wed Apr 04, 2012 12:58 am    Post subject:
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: 90
Location: Chennai

PostPosted: Wed Apr 04, 2012 8:53 am    Post subject: Reply to: Attributes of File
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    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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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