Page 1 of 1

How to rewrite PDS directory stats in REXX or ISPF

PostPosted: Tue May 03, 2011 8:35 am
by good123
I don't know to rewrite the stats for member's stats.below are portions of rexx code & ISPF library services lmmstats code
how can i keep member's stats and rewrite it to pds directory?
do any one give me some suggestions ?
thanks!

dsname = "ANQ.ETNE.PDS'
'ALLOC F(AREAD) DS('dsname') SHR REUSE
DSORG(PS) LRECL(256) RECFM(F B)'
'EXECIO * DISKR AREAD ( FINIS STEM MSTATS.'
'FREE F(AREAD)'

"EXECIO * DISKR JobTable (FINIS STEM JobName."
Job_count = 0
Do i = 1 to JobName.0
address ispexec
"lmmfind dataid("did") member("JobName.i") stats(yes)"
if rc = 0 then /* yes,found the job */
Do
JobName_out = LEFT(STRIP(JobName.i),8) /* default pad is blank */
zlchtime = zlmtime || ":" || zlmsec
out_rec = JobName_out zlcnorc zlc4date zlm4date zlchtime,
zluser zlinorc zlvers zlmod
/* SAY "OUT_REC IS :" OUT_REC */
push out_rec
address tso
"EXECIO 1 DISKW JobStats"
job_count = job_count + 1
End

Re: How to rewrite PDS directory stats in REXX or ISPF

PostPosted: Tue May 03, 2011 8:47 am
by MrSpock
LMMSTATS, like you mentioned. I don't quite undersand what your question is?

Re: How to rewrite PDS directory stats in REXX or ISPF

PostPosted: Tue May 03, 2011 11:25 am
by good123
Mrspock:
thanks.yes,i review the LMMSTATS and LMMFIND services,i got the answer.
the first,uing LMMFIND service "dialog variables"
like zlmtime 、 zlmsec 、zlmsec 、zlmnorc 、zlcnorc 、 zlc4date 、zlm4date 、 zluser 、zlinorc 、zlvers 、 zlmod to keep
them.
the second, using LMMSTATS service to set stats for each member.
vv.mm is a problem for me, it bother me many years,because i always thought about directory of pds must use assembler to
resolve it.
i have project that modify 1000 jcl ,and some string will be changed,but need to keep the member's statistics.

Re: How to rewrite PDS directory stats in REXX or ISPF

PostPosted: Tue May 03, 2011 11:55 am
by prino
good123 wrote:i have project that modify 1000 jcl ,and some string will be changed,but need to keep the member's statistics.
For those jobs you don't use REXX, you use PDSUPDTE.

Re: How to rewrite PDS directory stats in REXX or ISPF

PostPosted: Tue May 03, 2011 12:05 pm
by steve-myers
good123 wrote:...
i have project that modify 1000 jcl ,and some string will be changed,but need to keep the member's statistics.

Not a good idea. If you are altering the member, you want to update its last modification date in the directory.

I'm confused here. If you do not want to alter the directory, why on earth are you asking a question about how to alter the directory?

Other than ISPF services and programs like the Binder, few programs create user data in directory entries. While it's not difficult, I don't think I've ever seen a formal statement about the contents of the user data in an ISPF directory entry.

"...modify 1000 jcl ..." is improper terminology. You want to say "... modify 1000 JCL members ..."

Re: How to rewrite PDS directory stats in REXX or ISPF

PostPosted: Tue May 03, 2011 1:15 pm
by good123
thank myers.
my project that choice(or select) some meber , copy original pds(PDSA) to work area(PDSB) ,and change some strings,then
write to target pds(PDSC).if REXX do not use the LM services,the member's statistics is empty,so i need to keep the original
statistics.
p.s. English not my country Language.