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.
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.
| Model | When used | Typical PGM |
|---|---|---|
| Compile-and-go | Development, ad hoc fixes, small tests | EZTPA00 with source in SYSIN |
| Execute load module | Production scheduled jobs | Your program name from load library |
| Compile link execute (3-step) | Promote to production load lib | EZTPA00 then IEWL then your PGM |
12345678//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.
12345678//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.
Easytrieve rarely runs in isolation. Typical dependency chain:
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.
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.
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.
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.
1. Compile-and-go means:
2. Production jobs usually execute:
3. SYSPRINT in batch typically goes to:
4. Batch schedulers (Control-M, TWS) submit:
5. Return code 0 from an Easytrieve step generally means: