Easytrieve Execution

Execution is where Easytrieve earns its keep. The source has been compiled, the load module has been promoted, and the scheduler starts the job against real business files. This phase turns declarative report logic into printed listings, extracts, audit trails, and operational evidence. Beginners should treat execution as more than “the job turned green.” A complete execution review checks data volume, report routing, totals, and downstream handoff.

Progress0 of 0 lessons

What Happens During Execution

When the scheduler submits the job, JES allocates the step, z/OS resolves DD statements, and the loader brings the program into memory along with required Easytrieve runtime services. The program initializes working storage, opens files, processes records through JOB INPUT or explicit logic, formats reports, closes files, writes diagnostics, and ends with a condition code. Broadcom's beginner examples show this loop clearly: define fields, JOB INPUT, conditional PRINT, and REPORT layout produce formatted output without hand-written read loops.

Typical Execute JCL

jcl
1
2
3
4
5
6
//DAILYRPT EXEC PGM=SALESRPT //STEPLIB DD DSN=PROD.APP.LOADLIB,DISP=SHR // DD DSN=PROD.EASYTRIEVE.CBAALOAD,DISP=SHR //SALESIN DD DSN=PROD.SALES.DAILY,DISP=SHR //SYSPRINT DD SYSOUT=* //SALESRPT DD SYSOUT=A

PGM=SALESRPT runs the linked application module. STEPLIB finds that module and the Easytrieve runtime. SALESIN is the business input matching FILE SALESIN in source. SYSPRINT captures diagnostics. SALESRPT routes the business report to class A or the site-standard report class.

Execution Inputs and Outputs

Execution artifacts
ArtifactPurpose
Input datasetsBusiness files the program reads record by record
Output datasetsExtracts, archives, or downstream feeds created by the job
SYSPRINTDiagnostics, DISPLAY output, and sometimes counts
Report DD streamsFormatted human-readable report output
Return codeOperations signal for success, warning, or failure

JOB INPUT in Execution

Most beginner reports rely on JOB INPUT because Easytrieve handles open, read, process, and close automatically. During execution, each input record becomes the current context for IF tests, calculations, and PRINT requests. The report writer then applies titles, headings, line spacing, page breaks, and totals according to the REPORT definition.

text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
FILE PERSNL FB(150 1800) EMPNAME 17 8 A EMPNO 9 5 N DEPT 98 3 N GROSS 94 4 P 2 JOB INPUT PERSNL IF DEPT = 911 PRINT PAY-RPT END-IF REPORT PAY-RPT LINESIZE 80 TITLE 01 'PERSONNEL REPORT EXAMPLE-1' LINE 01 DEPT EMPNAME EMPNO GROSS

At execution time, only records with DEPT equal to 911 contribute detail lines to PAY-RPT. If the input file is empty, the job may still complete successfully while producing little or no detail output. That is why operations checks counts, not only return codes.

Operations Monitoring

Operations cares about timeliness, return codes, abends, reruns, and downstream impact. A late job may still be successful. A on-time job with RC=4 may require investigation depending on shop standards. Easytrieve execution should be documented in a run book with expected start time, input dataset pattern, output destination, owner contact, and rerun rules.

  • Did the job start in the expected batch window?
  • Did all DD statements allocate successfully?
  • What return code and message text appeared on SYSPRINT?
  • Did record counts match historical norms?
  • Did the report arrive in the correct class, dataset, or distribution path?
  • Did dependent jobs consume the output successfully?

Execution vs Compile-and-Go

Execution patterns
PatternWhen used
Execute linked load moduleProduction and controlled QA reruns
Compile-and-go with EZTPA00Developer tests and urgent ad hoc runs
Rerun after upstream fixInput file or predecessor job was late or wrong

Common Execution Failures

  • Missing or misspelled business DD name.
  • Input dataset empty, truncated, or wrong generation.
  • Invalid packed decimal or character data in input records.
  • Insufficient space on output dataset or spool.
  • Wrong load module promoted to production.
  • Report routed to an unmonitored output class.

Restart and Rerun Considerations

Easytrieve batch jobs are often rerunnable when input and output dispositions are designed for it. If a job creates a new generation with DELETE on failure, rerun may be safe. If it updates a file in place, rerun can duplicate results. Design execution JCL and output DISP values with rerun behavior in mind and document it in the run book.

Explain It Like I'm Five

Execution is showtime. The practice is over, the recipe is approved, and the cake is baked for the real party. If the party guests do not get cake, it does not matter that the recipe looked fine on paper. Execution is when the real people, real files, and real reports show whether the program worked.

Exercises

  1. Write execute JCL for a linked module with one input file and one report DD.
  2. List five operations checks after a nightly Easytrieve job completes.
  3. Explain why an RC=0 job can still be a business failure.
  4. Describe how JOB INPUT simplifies execution compared with manual read loops.
  5. Document rerun rules for a job that creates a new output generation each run.

Quiz

Test Your Knowledge

1. Execution in the lifecycle means:

  • The linked or compile-and-go program runs against real data
  • Only editing source in ISPF
  • Only writing macros
  • Only cataloging datasets

2. A production execute step usually uses PGM=

  • The application load module name
  • EZTPA00 only
  • IEFBR14
  • IDCAMS always

3. Before execution, z/OS first:

  • Allocates DD statements for the step
  • Deletes all source libraries
  • Recompiles automatically
  • Formats all DASD

4. A successful execution review should include:

  • Return code, record counts, and expected report output
  • Only the job name
  • Only the compile listing
  • Only the source member timestamp

5. Execution differs from compilation because:

  • It processes real files and writes reports or extracts
  • It only checks syntax
  • It only creates object code
  • It only expands macros
Published
Read time11 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom Easytrieve batch execution and z/OS operations practicesSources: Broadcom Easytrieve Report Generator 11.6 TechDocs, filtered report examples, batch operations conventionsApplies to: Easytrieve production and test execution on z/OS