[USflag] The American Programmer [USflag]


Home
Books on Mainframe Programming
Mainframe Manuals and Tutorials
System Abend codes, Sqlcodes, VSAM/QSAM codes
Everything about the IBM AS/400 Midrange Computer - iSeries
Everything about CICS
Everything about COBOL
Everything about DB2 and SQL
Everything about IMS
Everything about Java and JavaScript
Everything about JCL and JES
Everything about REXX
Everything about zOS, VSAM, Tivoli, Assembler
Everything about TSO, ISPF, Spufi
  TSO/ISPF: Just enough to get you started
  Running ISPF in batch. Tutorial.
  ISPF variables. Tutorial.
  TSO Line Mode Commands (such as DELETE, HRECALL, ALLOCATE, Line Mode EDIT)
  Executing SQL in Spufi. Tutorial.
  Comparison of REXX and CLIST
  Writing ISPF Editor macros
  Manuals for TSO
  Books on TSO, ISPF and CLIST
Site Map and Site Search

           Home   > TSO, ISPF, SPUFI   > ISPF Batch

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,

// DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=3120),

// SPACE=(TRK,(5,0,5))

//ISPLOG DD UNIT=SYSDA,

// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=3120),

// SPACE=(TRK,(5,0))

//SYSTSIN DD *

PROFILE PREFIX(your-userid)

ISPSTART CMD(name-of-rexx-program)

 


IBM manual section on batch mode
You’ll find manuals on TSO at: Manuals.
You will find a large selection of mainframe books at: Books.
[Books Computer]

Home Books for Computer Professionals Privacy Terms |
Site Map and Site Search Programming Manuals and Tutorials The REXX Files Top of Page |