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
 
How to find syscreate, size, changed date for a pds member

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
rabindranathtawker

New User


Joined: 22 Jun 2007
Posts: 22
Location: Connecticut

PostPosted: Thu Aug 23, 2007 4:24 pm    Post subject: How to find syscreate, size, changed date for a pds member
Reply with quote

Hi,

I would like to find creation date, last updated date, size & last updated user for a given pds member. Any command that would give me this result?

I tried with listdsi but it gave me info about the pds & not the member. (tht too only syscreate & sysblksize worked).

Thanks...Rabin
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Thu Aug 23, 2007 5:35 pm    Post subject: Reply to: How to find syscreate, size, changed date for a pd
Reply with quote

Since you're dealing with a PDS, you ought to be using ISPF Services for what you need. Specifically, you should use the ISPF LMMLIST Service with the LIST and STATS(YES) parameters enabled.
Back to top
View user's profile Send private message
rabindranathtawker

New User


Joined: 22 Jun 2007
Posts: 22
Location: Connecticut

PostPosted: Thu Aug 23, 2007 6:36 pm    Post subject: Reply to: How to find syscreate, size, changed date for a pd
Reply with quote

Hi,

Thanks for your suggestion. Find my code below..

Code:
/* Rexx */                                                             
trace i                                                                 
oudsn='T6201BTX.C6201.JOBINFO.CNTL'                                     
address ISPEXEC                                                         
ARG OUDSN SAVDSN                                                       
"LMINIT DATAID(ouid) DATASET('"oudsn"')"                               
SAY RC                                                                 
IF RC = 0 THEN DO                                                       
  "LMOPEN DATAID("ouid")"                                               
  "LMMLIST DATAID("ouid") OPTION(SAVE) STATS(YES) MEMBER(F3162C04)     
                                  GROUP("SAVDSN")"                     
END                                                                     
say '.'                                                                 
"LMFREE DATAID("ouid")"                                                 
EXIT                                                                   



The output that im getting is RC 8 for LMINIT command..


Code:

 3 *-* oudsn='T6201BTX.C6201.JOBINFO.CNTL'             
   >L>   "T6201BTX.C6201.JOBINFO.CNTL"                 
 4 *-* address ISPEXEC                                 
 5 *-* ARG OUDSN SAVDSN                               
   >>>   ""                                           
   >>>   ""                                           
 6 *-* "LMINIT DATAID(ouid) DATASET('"oudsn"')"       
   >L>   "LMINIT DATAID(ouid) DATASET('"               
   >V>   ""                                           
   >O>   "LMINIT DATAID(ouid) DATASET('"               
   >L>   "')"                                         
   >O>   "LMINIT DATAID(ouid) DATASET('')"             
   +++ RC(8) +++                                       
 7 *-* SAY RC                                         
   >V>   "8"                                           
                                                       
 8 *-* IF RC = 0                                       
   >V>   "8"                                           
   >L>   "0"                                           
   >O>   "0"                                           
13 *-* say '.'                                         
   >L>   "."                                           
                                                       


Any idea where the problem is?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Aug 23, 2007 7:19 pm    Post subject:
Reply with quote

Try to add SAY ZERRSM ; SAY ZERRLM right after the LMINIT.

O.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Thu Aug 23, 2007 7:59 pm    Post subject: Reply to: How to find syscreate, size, changed date for a pd
Reply with quote

5 *-* ARG OUDSN SAVDSN

I don't see that you ever supplied a value for either parameter.
Back to top
View user's profile Send private message
rabindranathtawker

New User


Joined: 22 Jun 2007
Posts: 22
Location: Connecticut

PostPosted: Thu Aug 23, 2007 8:08 pm    Post subject:
Reply with quote

I have given value for oudsn right at the start of the program..

As u said, i missed out for savdsn.. which i have included now in my program.. but im getting the error that the apostrophes is not properly matching...

Code:
 oudsn = 'T6201BTX.C6201.JOBINFO.CNTL'         
 savdsn = 'T3162BTX.T3162.MEMB.INFO.RPRT'     
 address ISPEXEC                               
 ARG OUDSN SAVDSN                             
 "LMINIT DATAID(ouid) DATASET('"oudsn"')"     
 SAY ZERRLM                                   


Code:
   +++ RC(8) +++                                           
 8 *-* SAY ZERRLM                                         
   >V>   "Data set name contains unbalanced apostrophes.   
                                                           
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Thu Aug 23, 2007 8:42 pm    Post subject:
Reply with quote

I found when I was first fighting with Library Management services (LMM...) and learning the proper syntax, I needed to use a combination of SAY's and TRACE. Using TRACE will allow you to see how the LMINIT instruction is being resolved. Thus you would not have to put a SAY oudsn after the SAY ZERRLM.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Thu Aug 23, 2007 8:51 pm    Post subject: Reply to: How to find syscreate, size, changed date for a pd
Reply with quote

My best guess?

Clean-up the dataset names (OUDSN SAVDSN) passed through the ARG command:

remove any extra spaces before or after the name.
remove any single or double quotes before or after the name.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Aug 23, 2007 9:12 pm    Post subject:
Reply with quote

My suggestions:

Add
Code:
OUDSN = "'"STRIP(OUDSN,"B","'")"'"


Change the LMINIT to:
Code:
LMINIT DATAID(ouid) DATASET(&oudsn)"



O.
Back to top
View user's profile Send private message
rabindranathtawker

New User


Joined: 22 Jun 2007
Posts: 22
Location: Connecticut

PostPosted: Fri Aug 24, 2007 10:54 am    Post subject:
Reply with quote

Hi,

Thanks all for your suggestion. Find my modified code below. Though the program ended with RC 0, it gave a message "Invalid List id" & moreover, im not able to locate my output dataset (savdsn). I believe the output dataset would be like this - userid.report.MEMBERS (report is taken from savdsn). Let me know if my understanding is wrong.


Code:
/* Rexx */                                                             
trace i                                                                 
oudsn = 'T6201BTX.C6201.JOBINFO.CNTL'                                   
savdsn = 'REPORT'                                                       
address ISPEXEC                                                         
/*ARG OUDSN SAVDSN*/                                                   
SAY OUDSN                                                               
SAY SAVDSN                                                             
OUDSN = "'"STRIP(OUDSN,"B",'"')"'"                                     
savdsn = "'"STRIP(savdsn,"B",'"')"'"                                   
"LMINIT DATAID(ouid) DATASET(&oudsn)"                                   
                         
SAY ZERRLM                                                             
SAY RC                                                                 
IF RC = 0 THEN DO                                                       
  "LMOPEN DATAID("ouid")"                                               
  "LMMLIST DATAID("ouid") OPTION(SAVE) STATS(YES) MEMBER(F3162C04)     
                                  GROUP(&SAVDSN)"                       
SAY RC                         
END                           
say '.'                       
"LMCLOSE DATAID("ouid")"       
"LMFREE DATAID("ouid")"       
EXIT                           
Back to top
View user's profile Send private message
rabindranathtawker

New User


Joined: 22 Jun 2007
Posts: 22
Location: Connecticut

PostPosted: Fri Aug 24, 2007 4:25 pm    Post subject:
Reply with quote

Hi all,

I used pattern instead of member in LMMLIST to fix the above problem. Find below the code..

Code:
 /* REXX */                                                 
 /* LMMLIST - LIST A LIBRARY'S MEMBERS */                   
 DATASET = 'T6201BTX.C6201.JOBINFO.CNTL'                     
 ADDRESS ISPEXEC                                             
 TRACE R                                                     
 "LMINIT DATAID(INPUT) DATASET('"DATASET"') ENQ(SHR)"       
 SAY ZERRLM                                                 
 "LMOPEN DATAID("INPUT")"                                   
 SRCHPAT = 'F316223A'                                       
 "LMMLIST DATAID("INPUT") OPTION(SAVE)",                     
     "PATTERN("SRCHPAT") GROUP(LMMLIST)"                     
 SAY RC                                                     
 "LMCLOSE DATAID("INPUT")"                                   
 "LMFREE DATAID("INPUT")"                                   
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm

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