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.
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.
1234//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.
12345//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.
| Section | Why it matters |
|---|---|
| Options and environment | Shows compatibility, listing, and product settings that affect compile behavior |
| Source listing | Confirms the compiler read the expected source member and line sequence |
| Diagnostic messages | Identifies syntax, semantic, field, report, macro, or option errors |
| Cross-reference | Helps locate where fields, procedures, and reports are defined and used |
| Summary | Shows 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.
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.
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.
| Allocation | Best for |
|---|---|
| SYSOUT=* | Development, quick diagnostics, default spool review |
| SYSOUT=A | Production class routing, print/distribution standards |
| Temporary dataset | Passing listing to a later job step for scanning |
| Permanent dataset | Audit retention, repeat review, automated comparisons |
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.
123REPORT 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.
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.
1234567W-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
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.
1. SYSPRINT usually contains:
2. During compile, SYSPRINT helps you find:
3. A common beginner mistake with SYSPRINT is:
4. SYSPRINT DD SYSOUT=* means:
5. If SYSPRINT is missing from JCL: