I like my own template better (plus read the comments at the top):
//useridI JOB (ACCT),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=ISP.SISPPENU //* DD DISP=SHR,DSN=userid.CNTL //ISPSLIB DD DISP=SHR,DSN=ISP.SISPSLIB // DD DISP=SHR,DSN=ISP.SISPSENU //ISPMLIB DD DISP=SHR,DSN=ISP.SISPMENU //* DD DISP=SHR,DSN=userid.CNTL //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=userid.CNTL // DD DISP=SHR,DSN=ISP.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=ISP.SISPEXEC //SYSPROC DD DISP=SHR,DSN=ISP.SISPCLIB // DD DISP=SHR,DSN=userid.CNTL //SYSTSPRT DD SYSOUT=* //SYSTSIN DD * PROFILE PREFIX(userid) ISPSTART CMD(%blah parm) NEWAPPL(ISR) On Tue, 1 Oct 2013 12:23:07 -0500, Mark Zelden <[email protected]> wrote: >On Tue, 1 Oct 2013 16:29:15 +0000, Rouse, Willie <[email protected]> wrote: > >>Hello All, >> >>Is there a simple way to run ISPF DSLIST as a batch TSO job? >> > >You can use this JCL as a template: > >(from http://www-01.ibm.com/support/docview.wss?uid=swg21023990) > > >snip> > > > >Concatenate a PDS to SYSPROC and create a member with a CLIST >similar to this one below and replace the CMD with the member >name you create. I call mine DSLISTSV. > > Example - ISPSTART CMD(DSLISTSV L(hlq1.lvl2)) > > >The list will be saved in userid.SAVE.DATASETS unless you >change "G" from the sample CLIST below. > > >PROC 0 L(&SYSUID) G(SAVE) > /* */ > /* Quick ISPF save of data set names. This is much quicker */ > /* than using OPT 3.4, because it does not do an obtain */ > /* for each data set in the list because of STATS(NO). */ > /* The dsn created will be USERID.SAVE.DATASETS */ > /* */ > ISPEXEC CONTROL ERRORS RETURN > ISPEXEC LMDINIT LISTID(LISTID) LEVEL(&L) > ISPEXEC LMDLIST LISTID(&LISTID) OPTION(SAVE) STATS(NO) GROUP(&G) > WRITE COMPLETE!! RETURN CODE WAS &LASTCC > ISPEXEC LMDFREE LISTID(&LISTID) > > > >Regards, > >Mark >-- >Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS >mailto:[email protected] >ITIL v3 Foundation Certified >Mark's MVS Utilities: http://www.mzelden.com/mvsutil.html >Systems Programming expert at http://search390.techtarget.com/ateExperts/ >---------------------------------------------------------------------- >For IBM-MAIN subscribe / signoff / archive access instructions, >send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
