|The American Programmer|
ISPF in Batch
You may want to use some of ISPF's services in a batch job. You may want to use Variable Services, Library Management, Table Services or File Tailoring in batch. You can't display panels in a batch job.
Create and test your code as you would for use on-line. Write a REXX program to launch it as you would on-line. Create JCL similar to that shown here. Insert the name of your REXX program in the last line of the JCL. Place a JOB statement at the top and submit the JCL.
If you don't know all the library names referred to in the JCL, do the TSO command LISTALC STATUS when you are on-line. This will show you the names of the libraries assigned to the DDNAMES that are in use. Note these names and place them in the JCL.
If you plan to use File Tailoring or Table Services, you will need additional libraries and DDNAMES used with these features. You will have to ask your technical personnel what they are. Put them in your JCL as well.
By submitting your job to batch you will free up your terminal and possibly use less CPU time than you would on-line. In addition, if your batch job appears to go into a loop, you can easily cancel it from your terminal.
IBM warns you that these commands in batch will get you into an unending loop: ISPPREP, KEYS, ZKEYS, PFSHOW TAILOR, ENVIRON, LOG, LIST.
Generic JCL for executing ISPF in batch.
//* VALID JOB STATEMENT GOES HERE
//ISPFBATC EXEC PGM=IKJEFT1A,DYNAMNBR=200
//SYSEXEC DD DSN=name-of-rexx-library,DISP=SHR
//SYSPROC DD DSN=name-of-clist-library,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSHELP DD DSN=name-of-help-library,DISP=SHR
//ISPLLIB DD DSN=name-of-load-library,DISP=SHR
//ISPPLIB DD DSN=name-of-panel-library,DISP=SHR
//ISPMLIB DD DSN=name-of-message-library,DISP=SHR
//ISPSLIB DD DSN=name-of-skeleton-library,DISP=SHR
//ISPTLIB DD DSN=name-of-table-library,DISP=SHR
//SYSEDIT DD SPACE=(CYL,(1,5)),UNIT=SYSDA
//SYSEDIT2 DD SPACE=(CYL,(1,5)),UNIT=SYSDA
//SYSUT1 DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT2 DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT3 DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSUT4 DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//* you may use your ispf profile library here instead
//ISPPROF DD UNIT=SYSDA,
//ISPLOG DD UNIT=SYSDA,
//SYSTSIN DD *
Books for Computer Professionals
| Site Map and Site Search | Programming Manuals and Tutorials | The REXX Files | Top of Page |