Easytrieve Batch Execution

Batch execution is how most Easytrieve programs run in production: a scheduler submits JCL overnight, a step executes a load module or compile-and-go source, files are read and written through DD statements, and SYSPRINT captures listings. Understanding batch execution connects your source code to operations reality—return codes, restart, and dependencies with COBOL posting jobs that must finish first.

Progress0 of 0 lessons

Batch vs Online

Batch execution runs without a terminal user waiting. The job enters JES, executes steps sequentially, and completes with a condition code. Online Easytrieve (screens) is uncommon in new development but batch remains the default for operational reports at banks, insurers, and government agencies.

Execution Models

Batch execution patterns
ModelWhen usedTypical PGM
Compile-and-goDevelopment, ad hoc fixes, small testsEZTPA00 with source in SYSIN
Execute load moduleProduction scheduled jobsYour program name from load library
Compile link execute (3-step)Promote to production load libEZTPA00 then IEWL then your PGM

Compile-and-Go Batch Step

jcl
1
2
3
4
5
6
7
8
//RPTGO EXEC PGM=EZTPA00,REGION=4M //STEPLIB DD DISP=SHR,DSN=your.easytrieve.r116.CBAALOAD //EZOPTBL DD DISP=SHR,DSN=your.easytrieve.r116.EZOPTBL //EZTVFM DD UNIT=SYSDA,SPACE=(4096,(100,100)) //SYSPRINT DD SYSOUT=* //INFILE DD DISP=SHR,DSN=PROD.DAILY.TRANSACT //RPTOUT DD SYSOUT=* //SYSIN DD DSN=DEV.EZT.SOURCE(DAYRPT),DISP=SHR

INFILE DD must match FILE name in Library section. RPTOUT might be SYSOUT for print or a dataset for downstream consumption. Source in a PDS member is common for production-like tests even in compile-and-go when developers avoid inline SYSIN for change control.

Execute Precompiled Load Module

jcl
1
2
3
4
5
6
7
8
//RPTRUN EXEC PGM=DAYRPT,REGION=4M //STEPLIB DD DISP=SHR,DSN=PROD.EZT.LOAD // DD DISP=SHR,DSN=your.easytrieve.r116.CBAALOAD //EZOPTBL DD DISP=SHR,DSN=your.easytrieve.r116.EZOPTBL //EZTVFM DD UNIT=SYSDA,SPACE=(4096,(100,100)) //SYSPRINT DD SYSOUT=* //INFILE DD DISP=SHR,DSN=PROD.DAILY.TRANSACT //RPTOUT DD SYSOUT=*

STEPLIB concatenates application load library first, then product CBAALOAD so runtime resolves Easytrieve support routines. PGM=DAYRPT is the compiled program name from PARM LINK or compile-and-link proc.

The Batch Window and Job Dependencies

Easytrieve rarely runs in isolation. Typical dependency chain:

  1. COBOL or package posting completes; creates input files.
  2. Condition on predecessor job ensures file exists and prior RC=0.
  3. Easytrieve step reads input, produces report or extract.
  4. Downstream FTP, archive, or print job consumes output.

Schedulers use resource names, dataset availability triggers, or time-based starts. Developers document DD names and dataset names in run books so operations can restart from failed steps.

Return Codes and Abends

Condition code 0 indicates success per JCL COND conventions—verify shop standards. Compiler errors appear on SYSPRINT with message numbers (search Broadcom Messages and Codes). Runtime abends (S0C7 data exception, S013 dataset problems) require SYSPRINT and JESMSGLOG review. File layout mismatches between FILE definition and actual data cause common S0C7 errors for packed decimal fields.

SYSPRINT and Archiving

Broadcom notes: when SYSPRINT goes to a dataset and you want compile listing plus runtime messages in one place, use DISP=MOD on subsequent steps writing the same dataset. Audit teams archive SYSPRINT listings with job name, date, and input file generation number.

Performance in Batch

  • Pre-sort large inputs with DFSORT when Easytrieve CONTROL requires order.
  • Tune EZTVFM space to avoid secondary allocation delays.
  • Use report work file options (11.x) for very large reports instead of virtual-only storage.
  • Run heavy jobs early in the window to allow retry time.

Explain It Like I'm Five

Batch is the computer doing homework at night when nobody is at the keyboard. Easytrieve reads the day's file, prints the report, and leaves it in the printer tray (SYSOUT) before morning. If something breaks, the note on the printer (SYSPRINT) explains why.

Exercises

  1. Draw a three-job dependency diagram ending with Easytrieve.
  2. Compare compile-and-go vs load module execution for production suitability.
  3. List five DD names in a typical batch execute step.
  4. Explain why STEPLIB might concatenate two libraries.
  5. Describe where you would look first if a batch Easytrieve job gets RC=8.

Quiz

Test Your Knowledge

1. Compile-and-go means:

  • Source compiles and runs in one JCL step without separate link/execute
  • Only syntax check, no run
  • Online CICS only
  • No JCL required

2. Production jobs usually execute:

  • Precompiled load modules from an application load library
  • ISPF edit session only
  • Only compile-and-go ad hoc
  • Without DD statements

3. SYSPRINT in batch typically goes to:

  • SYSOUT class or dataset for listing and messages
  • SYS1.PARMLIB
  • Only CICS TDQ
  • Console only

4. Batch schedulers (Control-M, TWS) submit:

  • JCL jobs containing Easytrieve steps
  • Only REXX
  • Windows tasks only
  • Db2 plans directly

5. Return code 0 from an Easytrieve step generally means:

  • Successful completion
  • Abend S0C4
  • JCL error only
  • Compiler not found
Published
Read time10 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom Program Compilation and Link-Editing Using JCL 11.6Sources: Broadcom TechDocs batch JCL examples, JCL tutorial, operations batch practiceApplies to: z/OS batch Easytrieve execution