Easytrieve DD Statements

DD statements are the bridge between Easytrieve logic and z/OS resources. Your source defines logical file names such as PERSNL, SALESIN, or PAYFILE. JCL DD statements connect those names to real datasets, temporary files, or spool output. Without correct DD statements, a perfect Easytrieve program cannot open input, write reports, or even compile. This tutorial explains the DD names beginners see most often, what each parameter does, and how compile DDs differ from runtime DDs.

Progress0 of 0 lessons

What a DD Statement Does

In JCL, a DD statement defines a data set or output stream for one job step. The DD name is the label the program uses internally. The DD parameters tell z/OS which dataset to use, how to open it, whether to create or share it, and where output should go. Easytrieve does not bypass this model. Whether you compile with EZTPA00 or run a linked load module, the step still depends on DD allocation succeeding first.

Think of DD statements as plugs and sockets. Easytrieve source names the socket. JCL supplies the plug that fits. If the names do not match, or the plug points to a dataset that does not exist, the connection fails before report logic runs.

Core DD Names in Easytrieve Work

Frequently used Easytrieve DD names
DD nameRoleTypical use
STEPLIBLoad library search pathFind EZTPA00, application load modules, and Easytrieve runtime modules
SYSINInput streamSupply Easytrieve source, PARM statements, or runtime control cards
SYSPRINTListing and diagnostics outputCompiler listings, runtime messages, DISPLAY output
SYSLINObject outputHold compiled object for a later link-edit step
SYSLMODLoad module outputReceive linked executable program from binder step
Business file DDInput or output dataMatch FILE names in source such as PERSNL, INVOICE, or EXTRACT

Matching FILE Names to DD Names

In Easytrieve source, a FILE statement declares a logical file. At runtime, the program expects a DD with the same name unless your installation uses a documented exception. This is one of the most common beginner mistakes: the source says FILE CUSTOMER but the JCL allocates CUSTMAST. The names must align.

text
1
2
3
4
5
6
FILE CUSTOMER FB(200 2000) CUST-ID 1 10 N CUST-NAME 11 30 A JOB INPUT CUSTOMER PRINT CUST-RPT
jcl
1
2
3
4
5
//RUNRPT EXEC PGM=CUSTREP //STEPLIB DD DSN=PROD.APP.LOADLIB,DISP=SHR //CUSTOMER DD DSN=PROD.CUSTOMER.MASTER,DISP=SHR //SYSPRINT DD SYSOUT=* //CUSTOUT DD SYSOUT=A

The FILE name CUSTOMER matches the DD name CUSTOMER. The dataset PROD.CUSTOMER.MASTER is the physical file. Easytrieve reads records using the field positions defined in source. If CUSTOMER DD is missing, allocation fails even though CUSTOMER is clearly defined in the program.

Important DD Parameters

DD statements use many parameters. Beginners should understand the ones that appear in nearly every Easytrieve job.

Common DD parameters and their effect
ParameterWhat it does
DSN=Names the dataset, member, temporary dataset, or dummy reference
DISP=Controls dataset disposition: share, create, pass, delete, keep
SYSOUT=Routes output to a JES spool class instead of a named dataset
SPACE=Defines space for new datasets, often on temporary work files
UNIT=Specifies device type such as SYSDA or tape unit for new allocation
DCB=Can define record format and length when creating certain datasets

DISP=SHR is common on input files because the job only reads an existing dataset. DISP=(,PASS) is common on temporary object datasets passed to a later link step. SYSOUT=* routes listing or report output to spool. The exact combination depends on whether the DD is input, output, temporary, or product-related.

Compile DD Example

jcl
1
2
3
4
5
6
//EZTCOMP EXEC PGM=EZTPA00 //STEPLIB DD DSN=DEV.EASYTRIEVE.CBAALOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN DD DSN=DEV.EZT.SOURCE(PAYRPT),DISP=SHR //PANDD DD DSN=DEV.EZT.MACLIB,DISP=SHR //SYSLIN DD DSN=&&OBJ,UNIT=SYSDA,SPACE=(TRK,(5,5)),DISP=(,PASS)

STEPLIB finds the compiler. SYSIN reads source member PAYRPT. SYSPRINT captures the listing. PANDD supplies macros if the program uses them. SYSLIN receives object code for a later binder step. None of these DDs process business input during compile unless the source itself references runtime files in a compile-and-go flow.

Runtime DD Example

jcl
1
2
3
4
5
6
7
8
//PAYRUN EXEC PGM=PAYRPT //STEPLIB DD DSN=PROD.APP.LOADLIB,DISP=SHR // DD DSN=PROD.EASYTRIEVE.CBAALOAD,DISP=SHR //PERSNL DD DSN=PROD.HR.PERSONNEL,DISP=SHR //PAYFILE DD DSN=PROD.PAYROLL.EXTRACT(+1),DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA,SPACE=(CYL,(10,5)),DCB=(RECFM=FB,LRECL=200,BLKSIZE=0) //SYSPRINT DD SYSOUT=* //PAYLIST DD SYSOUT=A

Runtime DDs include business input PERSNL, business output PAYFILE, diagnostics SYSPRINT, and report PAYLIST. PAYFILE uses DISP=(NEW,CATLG,DELETE) because the job creates a new generation. PERSNL uses DISP=SHR because the job only reads the existing personnel file. Understanding input versus output disposition prevents accidental dataset deletion or failed creation.

DD Concatenation

Concatenation uses multiple DD statements with the same DD name. For input files, records are read from the first dataset until end of file, then from the next. For STEPLIB, modules are searched in order. For some output cases, concatenation behavior differs and may not be valid depending on dataset type. Always verify site standards before concatenating business output DDs.

jcl
1
2
//SALESIN DD DSN=PROD.SALES.EAST,DISP=SHR // DD DSN=PROD.SALES.WEST,DISP=SHR

If source says JOB INPUT SALESIN, Easytrieve reads all records from EAST, then all records from WEST, as one logical input stream. This is useful for regional file merges without copying datasets first.

Dummy DDs and Special Cases

Some jobs use DUMMY on a DD when a program expects the DD name but no real data is needed for that run. Other jobs use special DD conventions for sort work, dynamic allocation, or SQL access. Do not invent dummy DDs without understanding program requirements. A missing required DD fails; an unnecessary DUMMY may hide a real allocation problem if used incorrectly.

Common DD Failure Patterns

  • DD name in JCL does not match FILE name in Easytrieve source.
  • Dataset does not exist or is not cataloged when DISP expects an existing file.
  • Security denies read or write access to the executing user or scheduler ID.
  • DISP=(NEW,...) fails because a dataset with that name already exists.
  • Wrong record format or LRECL causes open failures or data misinterpretation.
  • Temporary dataset not passed correctly between compile and link steps.
  • Report DD routed to a class or destination nobody checked after the job ran.

Troubleshooting DD Problems

  1. Read JES allocation messages for the failing DD name and dataset.
  2. Compare JCL DD names with FILE statements in the Easytrieve source.
  3. Verify DSN, member name, DISP, catalog status, and security access.
  4. Check whether the step is compile or runtime and whether each DD is appropriate.
  5. Compare with a recent successful job for the same application.
  6. Inspect SYSPRINT only after confirming allocation succeeded or partially succeeded.

Explain It Like I'm Five

DD statements are labels on cords that plug things into the computer. Easytrieve asks for a cord named CUSTOMER. If JCL gives it a cord named CUSTOMER and plugs it into the right file cabinet, everything works. If JCL labels the cord wrong or plugs it into an empty drawer, Easytrieve cannot get the records it needs.

Exercises

  1. Write JCL DD statements for one input file and one report output file matching Easytrieve source.
  2. Explain the difference between DISP=SHR and DISP=(NEW,CATLG,DELETE).
  3. Describe how input DD concatenation changes record processing order.
  4. List compile DDs and runtime DDs for the same application.
  5. Create a troubleshooting checklist for a DD allocation failure on a business file.

Quiz

Test Your Knowledge

1. A DD statement connects:

  • A logical name to a physical dataset or spool stream
  • Source syntax to COBOL divisions
  • RACF users to CICS regions
  • Tape labels to printers only

2. Easytrieve FILE PERSNL in source expects:

  • A matching DD name PERSNL in the JCL step
  • Only SYSIN
  • Only STEPLIB
  • A Db2 plan name

3. DISP=SHR on an input DD means:

  • Share the existing dataset for read access
  • Delete the dataset after the step
  • Create a new catalog entry only
  • Mount a tape automatically

4. DD concatenation means:

  • Multiple datasets share one DD name and are searched or processed in order
  • All DD names are deleted
  • SYSIN becomes output
  • Only VSAM files are allowed

5. A compile step often needs DDs for:

  • STEPLIB, SYSIN, SYSPRINT, and sometimes SYSLIN or macro libraries
  • Only business input files
  • Only CICS TD queues
  • Only tape mount messages
Published
Read time12 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: z/OS DD allocation conventions and Broadcom Easytrieve 11.6 JCL patternsSources: Broadcom Easytrieve Report Generator 11.6 TechDocs, IBM z/OS JCL DD statement referenceApplies to: Easytrieve compile and runtime JCL on z/OS