SYSPRINT in Easytrieve

SYSPRINT is the place most Easytrieve beginners learn to read first. It is where compile listings, compiler messages, runtime diagnostics, and sometimes reports appear. When a job fails, SYSPRINT often tells you whether the problem is source syntax, a missing file, invalid data, a report writer issue, or a normal business warning. The DD name looks simple, but it carries the most practical evidence you need during day-to-day support.

Progress0 of 0 lessons

What SYSPRINT Does

SYSPRINT is a logical output name. Easytrieve writes text there so humans and operations tools can understand what happened. During compilation, it usually contains the source listing, diagnostic messages, cross-reference information, options used, and compile summary. During runtime, it may contain startup messages, file open messages, DISPLAY output, record counts, report writer messages, abnormal termination details, and output report lines if the program routes them there.

Do not confuse the DD name SYSPRINT with the JCL keyword SYSOUT. SYSPRINT is what the program opens. SYSOUT is one way to route that output to JES spool. You can allocate SYSPRINT to SYSOUT=*, SYSOUT=A, a temporary dataset, or a permanent dataset depending on how long the output should be kept and who needs to read it.

SYSPRINT in Compile JCL

jcl
1
2
3
4
//COMPILE EXEC PGM=EZTPA00 //STEPLIB DD DSN=DEV.EASYTRIEVE.CBAALOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN DD DSN=DEV.EZT.SOURCE(INVRPT),DISP=SHR

In this compile step, SYSPRINT is written to the JES spool. After the job runs, you can open the spool output and see whether the compiler accepted the source. The listing is not just “noise.” It is a structured diagnostic artifact. It shows what source the compiler actually read, which options applied, which lines generated messages, and the final severity that drove the return code.

SYSPRINT in Runtime JCL

jcl
1
2
3
4
5
//RUNRPT EXEC PGM=INVRPT //STEPLIB DD DSN=PROD.APP.LOADLIB,DISP=SHR //INVFILE DD DSN=PROD.INVENTORY.MASTER,DISP=SHR //SYSPRINT DD SYSOUT=* //RPTOUT DD SYSOUT=A

In this runtime step, SYSPRINT receives diagnostic text while RPTOUT receives the business report. Separating them helps operations because a thousand-line report does not bury a three-line error message. In smaller jobs, the report itself may go to SYSPRINT. The right pattern depends on distribution needs, spool retention, and local standards.

What to Look for in Compile SYSPRINT

Compile listing sections
SectionWhy it matters
Options and environmentShows compatibility, listing, and product settings that affect compile behavior
Source listingConfirms the compiler read the expected source member and line sequence
Diagnostic messagesIdentifies syntax, semantic, field, report, macro, or option errors
Cross-referenceHelps locate where fields, procedures, and reports are defined and used
SummaryShows final severity, counts, and compile result used by operations

The first real error is often more useful than later messages. Later errors may cascade from a missing field or bad macro expansion. For example, if the compiler cannot find a macro that defines twenty fields, it may report many undefined fields later. The root cause is the missing macro library, not twenty spelling mistakes.

What to Look for in Runtime SYSPRINT

Runtime SYSPRINT should be read like an event log. It can tell you which program started, which files opened, how many records were read, which validation message was displayed, and why a report stopped. The exact format varies by release and site options, but the workflow stays the same: read from the start of the step, identify the first abnormal condition, then connect it to JCL, input data, or source logic.

  • Startup messages identify the program, release, and sometimes options.
  • Open messages or allocation failures identify DD and dataset problems.
  • DISPLAY statements may show business validation progress or debug checkpoints.
  • Record count summaries help confirm whether input was empty, partial, or complete.
  • Report writer messages explain page, line, total, and output routing conditions.
  • Abend text or return-code explanations guide the next diagnostic step.

Routing SYSPRINT to Spool or Dataset

SYSOUT=* is convenient during development because you can view the output in SDSF as soon as the job runs. Production may use a named SYSOUT class for retention, printing, or distribution. Some regulated jobs write SYSPRINT to a permanent dataset so diagnostic evidence is retained with the batch cycle. Each choice has tradeoffs.

SYSPRINT routing choices
AllocationBest for
SYSOUT=*Development, quick diagnostics, default spool review
SYSOUT=AProduction class routing, print/distribution standards
Temporary datasetPassing listing to a later job step for scanning
Permanent datasetAudit retention, repeat review, automated comparisons

SYSPRINT and Report Output

Broadcom examples often show reports generated from simple FILE, JOB, REPORT, TITLE, and LINE statements. In a small example, the formatted report may appear in the main print stream. Production jobs usually separate diagnostic output from business report output so recipients do not receive compiler-like messages and support teams do not dig through thousands of report lines. Easytrieve can produce multiple reports, and each report may be associated with different output handling depending on source and JCL.

text
1
2
3
REPORT PAY-RPT LINESIZE 80 TITLE 01 'PERSONNEL REPORT EXAMPLE-1' LINE 01 DEPT EMPNAME EMPNO GROSS

This report definition controls the business layout. The JCL controls where the output stream is routed. If the report is missing, check both the Easytrieve report definition and the DD allocation. The program may have printed correctly to a class, dataset, or distribution queue you did not inspect.

Using DISPLAY with SYSPRINT

DISPLAY statements are often written to the main print or diagnostic stream. They are useful for support because they can show counts, keys, dates, or phase markers. Use them thoughtfully. A few well-placed messages help diagnose production issues. A DISPLAY for every record can flood SYSPRINT, inflate spool usage, and make the real error harder to find. In high-volume jobs, aggregate counts or conditional diagnostics are safer.

text
1
2
3
4
5
6
7
W-READ-COUNT W 8 N VALUE 0 JOB INPUT SALESIN W-READ-COUNT = W-READ-COUNT + 1 IF W-READ-COUNT = 1 DISPLAY 'FIRST SALES RECORD READ' END-IF

Common SYSPRINT Problems

  • Missing SYSPRINT DD means diagnostics are unavailable or the step fails on open.
  • Output class routes to a printer or held queue the developer did not check.
  • Large DISPLAY output exceeds spool expectations and masks the useful diagnostic lines.
  • Only the last message is reviewed, while the first error explains the cause.
  • Compile listing comes from a different source member than expected.
  • Production retention deletes spool before support reads it.

Beginner Reading Workflow

  1. Open the correct job, step, and SYSPRINT output in the spool tool.
  2. Confirm whether this is compile SYSPRINT or runtime SYSPRINT.
  3. Find the first error or warning with severity, not only the final return code.
  4. Map the message to source line, DD name, dataset name, or input record phase.
  5. Compare source listing and JCL with what you intended to submit.
  6. Save or copy message identifiers into the incident notes before rerunning the job.

Explain It Like I'm Five

SYSPRINT is like the teacher’s note after you finish a worksheet. It says what you tried, where you made a mistake, and sometimes shows the finished answer. If you only read the last sentence, you may miss the part that explains the mistake. Easytrieve writes its helpful notes to SYSPRINT so you can fix the right thing.

Exercises

  1. Find SYSPRINT in a compile job and identify source listing, messages, and summary sections.
  2. Change a sample JCL from SYSOUT=* to a named SYSOUT class and explain the routing effect.
  3. Write three DISPLAY messages that help support without printing for every record.
  4. Given a missing report, list checks involving both REPORT source and output DD routing.
  5. Explain the difference between SYSPRINT as a DD name and SYSOUT as a JCL routing parameter.

Quiz

Test Your Knowledge

1. SYSPRINT usually contains:

  • Listings, messages, and diagnostics
  • Only input source records
  • Only load modules
  • RACF passwords

2. During compile, SYSPRINT helps you find:

  • Source line diagnostics and compiler messages
  • Only tape mount requests
  • Only Db2 table rows
  • Only APF library names

3. A common beginner mistake with SYSPRINT is:

  • Reading only the last line and missing earlier root-cause messages
  • Using it to allocate STEPLIB modules
  • Replacing every input DD with it
  • Assuming it is always encrypted

4. SYSPRINT DD SYSOUT=* means:

  • Route output to the default JES spool class
  • Delete all output
  • Read inline source
  • Force a binary load module

5. If SYSPRINT is missing from JCL:

  • Diagnostics may be lost or the step may fail depending on program expectations
  • The source compiles faster always
  • STEPLIB is ignored
  • All reports go to SYSIN
Published
Read time12 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom Easytrieve compile listings, runtime diagnostics, and z/OS SYSOUT routing practicesSources: Broadcom Easytrieve Report Generator 11.6 TechDocs, z/OS JES spool and DD allocation conventionsApplies to: Easytrieve compile and runtime SYSPRINT output on z/OS