Page 1 of 1

update PDS members' account info

PostPosted: Wed Aug 03, 2011 2:37 pm
by pantierui
Hi folks,
VIEW              C210408.REXX.TEST                         Member TEST1 saved
Command ===>                                                  Scroll ===> CSR 
           Name     Prompt       Size   Created          Changed          ID   
_________ TEST1    *Edited         38  2011/08/03  2011/08/03 03:39:12  C210408
_________ TEST2                                                               


see above screen, member TEST1 has size, created date, changed date and time, id and so on, but member TEST2 has NOT.
I want to use rexx to update PDS members' account info.

Please give me some suggestion.
thank you for your help.

Terry

Re: update PDS members' account info

PostPosted: Wed Aug 03, 2011 4:31 pm
by MrSpock
You can use the ISPF LMMSTATS service to set ISPF statistics for a member of a partitioned data set. I don't know if that's what you mean.

Re: update PDS members' account info

PostPosted: Wed Aug 03, 2011 6:23 pm
by steve-myers
You can also use the Reset function in ISPF. In the ISPF Primayr Option Mednu enter 3 in the Option line and press your Enter key, then enter 5 on the Option line and press your Enter kry. ISPF will display the Reset ISPF Statistic panel. Specify R in the Option line, the new user ID in the appropriate place, select the other options and supply a PDS dataset name and member name and press your Enter key.

Re: update PDS members' account info

PostPosted: Wed Aug 03, 2011 7:15 pm
by pantierui
Thank you for your replies. MrSpock & steve-myers.

I will try it.

Re: update PDS members' account info

PostPosted: Thu Aug 04, 2011 3:44 pm
by GuyC
I'm no rexx expert (I probably sin against several "good practices")
but this was something I cooked up a year back:
ISPEXEC "LMINIT DATAID(lmid) DATASET(" pdsname ")"                       
IF RC > 0 then say 'LMINIT ' rc                                         
ISPEXEC "LMOPEN DATAID(" lmid ")"                                       
IF RC > 0 then say 'LMOPEN ' rc                                         
mbr = ''                                                                 
ISPEXEC "LMMLIST OPTION(LIST) DATAID("lmid") MEMBER(mbr) STATS(YES)"
lrc=rc                                         
do while lrc=0                                 
   say mbr ' ' zlm4date ZLMTIME ZLMSEC ZLUSER
   if (zlm4date = '')
   then do                                     
         /* call getparm */
ISPEXEC "LMMSTATS DATAID("lmid") MEMBER("mbr")",         
        " CREATED4("date1")",
        " MODDATE4("date2")",
        " MODTIME("time2")",
        " USER("userd")"                                     
   end   
ISPEXEC "LMMLIST OPTION(LIST) DATAID("lmid") MEMBER(mbr) STATS(YES)"
lrc=rc                                                             
end           
ISPEXEC "LMMLIST OPTION(FREE) DATAID("lmid")"
IF RC > 0 then say 'LMMLIST FREE ' rc zerrlm
ISPEXEC "LMCLOSE DATAID("lmid")"             
IF RC > 0 then say 'LMCLOSE ' rc zerrlm     
ISPEXEC "LMFREE DATAID("lmid")"             
IF RC > 0 then say 'LMFREE ' rc zerrlm