Thanks
Tom Koenig
You can call IEHLIST from within an exec. Something like this
push iehlist_control_records
execio * diskw ( finis
ds(sysin) f(input)
ds(sysprint) f(temp1) dcb(blaw blaw)
call iehlist
free f(temp1)
execio 0 diskw temp1 ( finis
execio * diskr temp1 ( fifo
It has been over a year since I done this, so the syntex may not be 100%
correct. But this is one way of doing it. There are other ways.
Good luck, William.
Tom, The statistics you refer to are ISPF constructs, and as such
should be manipulated with ISPF. The trick is to be able to find
the correct ISPF commands that can be used in a REXX exec/clist.
I've able to enter "SORT CHANGED ID" on the edit member selection
panel command line; but I haven't been able to get ISPF to do the
sorts from a REXX exec.
I use the following REXX program to call the ISPF editor - it can be
used from the READY prompt or from the ISPF command line; it's also
recursive. Take a look at the following manual:
ISPF/PDF Guide and Reference
Version 3 Release 5 for MVS
Document Number SC34-4258-03
Regards, Bruce
/* ED EXEC: REXXifed ED CLIST *********************************** */
/* */
/* "EDIT" RECURSIVE CLIST */
/* WRITTEN 13MAR86, WILLIAM SMITH, SYNTEX TECHNICAL SUPPORT */
/* . SIMPLE RECURSIVE CLIST TO DIRECTLY INVOKE THE PDF EDIT */
/* SERVICE FROM WITHIN ISPF OR FROM READY MODE TSO */
/* . EXISTENCE OF DATA SET IS VERIFIED PRIOR TO EDIT ENTRY */
/* RE-WRITEN 07DEC88, BRUCE RICHARDSON, AMDAHL CANADA LTD */
/* . ONLY THE DATA-SET NAME IS VERIFIED TO EXIST, THIS */
/* ALLOWS WILD-CARDING AND NON-EXITENT MEMBERS TO BE */
/* ADDED. */
/* Re-written 29Sep89, Bruce Richardson, Amdahl Canada Ltd */
/* . in REXX */
/* */
/* ***************************************************************** */
arg dsn opt
parse source . . cmd . . . . env .
select
when opt='' then nop
when abbrev(opt,'DEBUG',1) then trace 'A'
otherwise say 'Option "'opt'" ignored.'
end
if dsn='?' then do
say 'Snytax: 'cmd' <dsn|?|null> <Debug>'
say ' where dsn is the dataset requested'
say ' ? gives this help'
say ' Debug turn on tracing'
exit 0
end
if (dsn='')|(dsn='""')|(dsn="''") then do
if env='ISPF' then "ISPEXEC SELECT PGM(ISREDIT) PARM(P,ISREDM01)"
else "ISPF 2"
exit rc
end
dist=index(dsn,'(')
if dist=0 then test_dsn=dsn
else if substr(dsn,1,1)="'" then test_dsn=substr(dsn,1,dist-1)"'"
else test_dsn=substr(dsn,1,dist-1)
if sysdsn(test_dsn)='OK' then ,
if env='ISPF' then "ISPEXEC EDIT DATASET("dsn")"
else "ISPSTART PANEL(ISR@PRIM) OPT(%"cmd dsn opt")"
else do
say " ***** "dsn" Does not exist... Try again *****"
say " ***** "sysdsn(dsn)" *****"
end
Probably the most useful method to manipulate this data is through the
ISPF LMMLIST or LMMDISP services. LMMLIST will let you walk through
a list of members in a data set (in member name order, so you'd need
to sort yourself for ID) to see the stats, or LMMDISP, which lets
a user select a member, and you can then obtain the info you need.
To use LMMDISP, you would need to
LMINIT the data set to an ISPF data id
LMOPEN the data id
while rc = 0
LMMLIST each member, using STATS(YES) to retrn the stats
end while
LMCLOSE the data id <<== always remember this!
LMFREE the data it <<== " " "
Now, a little soapbox...
The LMMSTATS service can be used to CHANGE the stats. What does
this mean? It means anyone who has authority to edit the data set
CAN ALSO CHANGE THE STATS IF THEY WANT. Most people won't do this,
but if someone wants to be sneaky...
The stats will also NOT be updated if someone does some other type
of write to the data set (like EXECIO from a rexx exec.)
Bottom line: The ISPF statistics are not a "safe" means of tracking
who really updates a member. Be careful how you use
the ISPF stats!
Scott Stanchfield
(These are not the opinions of Loral Federal Systems.)
> Now, a little soapbox...
> The LMMSTATS service can be used to CHANGE the stats. What does
You don't have to resort to such drastic measures like using LMF services in
programs to change the stats. ISPF command 3;5 will do this nicely for you.
//VOIROL JOB (00411,4001642),CLASS=1,MSGCLASS=T,MSGLEVEL=(1,1)
/*JOBPARM ROOM=SWITZERLAND
//FRSTSTEP EXEC PGM=AMIGAOS
//TOMV DD DSN=VISMAG.LIMMAT.NET.CH,DISP=(NEW,CATLG,DELETE),
// RECFM=FB,LRECL=80,BLKSIZE=23440,SPACE=(TRK,(20,5,10),RLSE)
Hmmmmm... I've been working with ISPF for six years now and for some
reason I've never selected that option. Not that I've ever needed it...
My point was just that the stats are easy to change, so don't count
on them. There are several people on my project who think that the
stats are a reliable source of CM data. You should see their faces
when they find out that the data can be changed...