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
 
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: 2086
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: 1522
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

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