I am trying to change the user-id value of a module within a PDS.
That can be done interactively within ISPF, using menu-option 3.5 (in a non-custome ISPF set-up).
I want to do this using a Rexx program instead.
It will probably be best to use the ISPF Service LMMSTATS.
//TSOBATCH EXEC PGM=IKJEFT01,DYNAMNBR=40,PARM='ISPSTART CMD(%GENDIAG)'
//ISPPROF DD DSN=&&T,DISP=(,PASS),SPACE=(CYL,(10,10,10),RLSE),
// DCB=(SYS1.PARMLIB)
//ISPMLIB DD DSN=SYS1.SISPMENU,DISP=SHR
//ISPPLIB DD DSN=SYS1.SISPPENU,DISP=SHR
//ISPSLIB DD DSN=SYS1.SISPSENU,DISP=SHR
// DD DSN=SYS1.SISPSLIB,DISP=SHR
//ISPTLIB DD DSN=SYS1.SISPTENU,DISP=SHR
//SYSPROC DD DSN=&SYSUID..GENDIAG,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY,DCB=BLKSIZE=80
//SYSTSIN DD DUMMY,DCB=BLKSIZE=80
/**********************************************************************/
/* RESET ISPF STATS TO USERID ISPF_USERID */
/**********************************************************************/
ISPFSTATS:PROCEDURE
PARSE ARG ISPF_DSN,ISPF_MEMBER,ISPF_USERID
ADDRESS ISPEXEC
"LMINIT DATAID(DATAID) DATASET('"ISPF_DSN"') ENQ(SHR)"
"LMOPEN DATAID("DATAID")"
"LMMSTATS DATAID("DATAID") MEMBER("ISPF_MEMBER"),USER("ISPF_USERID")"
LMMSTATS_RC=RC
"LMFREE DATAID("DATAID")"
RETURN LMMSTATS_RC
I have pasted the JCL and the code together from here, http://ibmmainframeforum.com/viewtopic.php?f=18&t=1772, contributed by user ehrocha.
You should locate, freely available from IBM on the internet, the Interactive System Productivity Facility (ISPF) Services Guide for your release of z/OS. There you will find the full documentation of LMMSTATS and all the other ISPF Services available.