On Mon, 27 Jul 2009 12:17:37 -0500, Todd Burrell <[email protected]> wrote:
>I am trying to come up with a way to create the same output in a batch job
>that you get when you pull up a PDS in ISPF 3.4 and select the "print index"
>option, and create a userid.SPFx.LIST dataset. Is there an easy way to do
>this, and could someone email me an example? I used to know how to do this,
>but I apparently have cleared memory, and I could not find this in the
>archives.
>
You need to run ISPF in batch, and then use something like this:
/* rexx */
/* Quick ISPF save of member stats. */
ARG DS G
/* DS is the data set name to get the stats from. */
/* G is the middle qualifer of the saved data set */
/* The saved data set name will be userid.g.MEMBERS */
If G = '' then G = 'STATS'
If DS = '' then DS = 'MY.PDS'
Address ISPEXEC
"CONTROL ERRORS RETURN"
"LMINIT DATAID(STATID) DATASET('"DS"')"
If RC = 0 then do
"LMOPEN DATAID("STATID")"
"LMMLIST DATAID("STATID") OPTION(SAVE) STATS(YES) GROUP("G")"
End
"LMFREE DATAID("STATID")"
Assuming you called the exec "MEMLSTSV" (like I do), then this is
how you can execute ISPF in batch:
//ISPFBTCH JOB (ACCT),'ZELDEN',CLASS=A,...
//********************************************************************
//*
//* To get a return code on completion, the variable ZISPFRC must
//* be updated and VPUT to the SHARED pool with the desired RC.
//* Otherwise ISPF will end with RC=0.
//*
//* To pass a variable to an EDIT MACRO in a batch CLIST/EXEC, it
//* must be done via VPUT and VGET. To pass a special return code
//* from an EDIT MACRO back to an invoking CLIST/EXEC, it must also
//* be done via VPUT and VGET.
//*
//********************************************************************
//ALOCPROF EXEC PGM=IEFBR14
//PROFILE DD UNIT=SYSALLDA,DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(1,1,5)),DCB=(LRECL=80,
// BLKSIZE=0,DSORG=PO,RECFM=FB),
// DSN=userid.ISPF.TEMPPROF
//*-------------------------------------------------------------------*
//* Invoke ISPF *
//*-------------------------------------------------------------------*
//BATCHPDF EXEC PGM=IKJEFT01,DYNAMNBR=128
//ISPPLIB DD DISP=SHR,DSN=SYS1.SISPPENU
//ISPSLIB DD DISP=SHR,DSN=SYS1.SISPSLIB
// DD DISP=SHR,DSN=SYS1.SISPSENU
//ISPMLIB DD DISP=SHR,DSN=SYS1.SISPMENU
//ISPPROF DD DSN=userid.ISPF.TEMPPROF,DISP=(OLD,DELETE)
//ISPTABL DD DSN=userid.ISPF.TEMPPROF,DISP=OLD
//ISPTLIB DD DSN=userid.ISPF.TEMPPROF,DISP=OLD
// DD DISP=SHR,DSN=SYS1.SISPTENU
//ISPLOG DD SYSOUT=*,
// DCB=(LRECL=120,BLKSIZE=2400,DSORG=PS,RECFM=FB)
//ISPLIST DD SYSOUT=*,
// DCB=(LRECL=121,BLKSIZE=1210,RECFM=FBA)
//* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//SYSEXEC DD DISP=SHR,DSN=SYS1.SISPEXEC
//SYSPROC DD DISP=SHR,DSN=SYS1.SISPCLIB
// DD DISP=SHR,DSN=userid.clist
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
PROFILE PREFIX(userid)
ISPSTART CMD(%MEMLSTSV) NEWAPPL(ISR)
HTH,
Mark
--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:[email protected]
z/OS Systems Programming expert at http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html