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.
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.
| DD name | Role | Typical use |
|---|---|---|
| STEPLIB | Load library search path | Find EZTPA00, application load modules, and Easytrieve runtime modules |
| SYSIN | Input stream | Supply Easytrieve source, PARM statements, or runtime control cards |
| SYSPRINT | Listing and diagnostics output | Compiler listings, runtime messages, DISPLAY output |
| SYSLIN | Object output | Hold compiled object for a later link-edit step |
| SYSLMOD | Load module output | Receive linked executable program from binder step |
| Business file DD | Input or output data | Match FILE names in source such as PERSNL, INVOICE, or EXTRACT |
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.
123456FILE CUSTOMER FB(200 2000) CUST-ID 1 10 N CUST-NAME 11 30 A JOB INPUT CUSTOMER PRINT CUST-RPT
12345//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.
DD statements use many parameters. Beginners should understand the ones that appear in nearly every Easytrieve job.
| Parameter | What 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.
123456//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.
12345678//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.
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.
12//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.
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.
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.
1. A DD statement connects:
2. Easytrieve FILE PERSNL in source expects:
3. DISP=SHR on an input DD means:
4. DD concatenation means:
5. A compile step often needs DDs for: