![]()
Need to run ISPF services or Edit in batch but don't know how to set up the JCL? Let the BATCHPDF edit macro do it for you. It uses the allocations you already have in your TSO session as a model for the JCL so that you don't need to know where all of the ISPF libraries are on your system.
BATCHPDF is available as sourcecode.
To save the source code using Netscape or Internet Explorer, select the link
above with the right mouse button and select 'Save Link As...' or Save Target
as...'
![]()
Create JCL to run ISPF in batch using your TSO allocations as a model.
BATCHPDF
The contents of the data in your edit session are replaced with the JCL. Modify the jobcard, and other items as need, add your ISPF code or a call to it and you should be done.
- Place batchpdf.txt in a library allocated to SYSEXEC or SYSPROC and call the member BATCHPDF (actually any member name will do).
//NADELI JOB (ACCT),NOTIFY=&SYSUID.,MSGLEVEL=(1,1)
//*-------------------------------------------------------------------*
//* Create Startup CLIST *
//*-------------------------------------------------------------------*
//GENER0 EXEC PGM=IEBGENER
//SYSUT1 DD *
ISPEXEC VGET (ZTIMEL) /* ISPF services can run here */
WRITE &ZTIMEL
/* Add any setup here */
/* And start your program here. Use ISPEXEC SELECT. */
/* */
/* To invoke the editor, code a line like: */
/* ISPEXEC EDIT DATASET('FRED.CNTL(BUBBA)') MACRO(BINKY) */
/* and remember that the macro must do an END or CANCEL. */
/* You can set the step return code if you want. */
SET ZISPFRC = 0
ISPEXEC VPUT (ZISPFRC) SHARED /* set step return code */
//SYSUT2 DD DISP=(,PASS),DSN=&&CLIST0(TEMPNAME),
// SPACE=(TRK,(1,1,2),RLSE),UNIT=VIO,
// DCB=(LRECL=80,BLKSIZE=0,DSORG=PO,RECFM=FB)
//PROFILE DD DISP=(,PASS),SPACE=(TRK,(10,10,5)),UNIT=VIO,
// DCB=(LRECL=80,BLKSIZE=0,DSORG=PO,RECFM=FB)
//SYSPRINT DD DUMMY
//SYSIN DD DUMMY
//*-------------------------------------------------------------------*
//* Initialize profile data set (optional) *
//*-------------------------------------------------------------------*
//* COPY EXEC PGM=IEBCOPY
//* SYSPRINT DD DUMMY
//* SYSIN DD DUMMY
//* SYSUT1 DD DISP=SHR,DSN=NADEL.SPF.ISPPROF
//* SYSUT2 DD DISP=(OLD,PASS),DSN=*.GENER0.PROFILE
//*-------------------------------------------------------------------*
//* Invoke ISPF *
//*-------------------------------------------------------------------*
//BATCHPDF EXEC PGM=IKJEFT01,DYNAMNBR=128
//SYSPROC DD DSN=&&CLIST0,DISP=(OLD,DELETE)
// DD DISP=SHR,DSN=NADEL.CLIST
// DD DISP=SHR,DSN=SYS1.SBPXEXEC
// DD DISP=SHR,DSN=ISP.SISPCLIB
// DD DISP=SHR,DSN=USER.CLIST
//SYSEXEC DD DISP=SHR,DSN=ISP.SISPEXEC
//ISPLLIB DD DISP=SHR,DSN=NADEL.PRIVATE.LOAD
//ISPPLIB DD DISP=SHR,DSN=NADEL.PRIVATE.PANELS
// DD DISP=SHR,DSN=SYS1.SBPXPENU
// DD DISP=SHR,DSN=ISP.SISPPENU
// DD DISP=SHR,DSN=ISF.SISFPLIB
//ISPSLIB DD DISP=SHR,DSN=NADEL.PRIVATE.SKELS
// DD DISP=SHR,DSN=ISP.SISPSLIB
// DD DISP=SHR,DSN=ISP.SISPSENU
//ISPMLIB DD DISP=SHR,DSN=NADEL.PRIVATE.MSGS
// DD DISP=SHR,DSN=SYS1.SBPXMENU
// DD DISP=SHR,DSN=ISP.SISPMENU
// DD DISP=SHR,DSN=ISF.SISFMLIB
//ISPPROF DD DISP=(OLD,PASS),DSN=*.GENER0.PROFILE
//ISPTABL DD DISP=(OLD,PASS),DSN=*.GENER0.PROFILE,VOL=REF=*.ISPPROF
//ISPTLIB DD DISP=(OLD,PASS),DSN=*.GENER0.PROFILE,VOL=REF=*.ISPPROF
// DD DISP=SHR,DSN=NADEL.SPF.ISPPROF
// DD DISP=SHR,DSN=SYS1.SBPXTENU
// DD DISP=SHR,DSN=ISP.SISPTENU
// DD DISP=SHR,DSN=ISF.SISFTLIB
// DD DISP=SHR,DSN=USER.TABLES
//ISPCTL0 DD DISP=(,DELETE),SPACE=(TRK,(10,10)),UNIT=VIO,
// DCB=(LRECL=80,BLKSIZE=0,DSORG=PS,RECFM=FB)
//ISPCTL1 DD DISP=(,DELETE),SPACE=(TRK,(10,10)),UNIT=VIO,
// DCB=(LRECL=80,BLKSIZE=0,DSORG=PS,RECFM=FB)
//ISPWRK1 DD DISP=(,DELETE),SPACE=(TRK,(10,10)),UNIT=VIO,
// DCB=(LRECL=80,BLKSIZE=0,DSORG=PS,RECFM=FB)
//ISPLST1 DD DISP=(,DELETE),SPACE=(TRK,(10,10)),
// DCB=(LRECL=133,BLKSIZE=0,DSORG=PS,RECFM=VB)
//ISPLOG DD SYSOUT=*,
// DCB=(LRECL=120,BLKSIZE=2400,DSORG=PS,RECFM=FB)
//ISPLIST DD SYSOUT=*,DCB=(LRECL=121,BLKSIZE=1210,RECFM=FBA)
//* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
PROFILE PREFIX(NADEL)
ISPSTART CMD(%TEMPNAME) NEWAPPL(ISR)
/*
//*-------------------------------------------------------------------*
|