Inline
In the mainframe context, "inline" primarily refers to data, procedures, or code that is embedded directly within the same input stream or file as the job control language (JCL) or source code, rather than being referenced from an external dataset or library. This allows for self-contained job submissions or program definitions on z/OS.
Key Characteristics
-
- Self-contained: The data, procedure, or code is an integral part of the job stream itself, eliminating the need for separate files.
- No external dataset reference:
DDstatements for inline data (e.g.,DD *,DD DATA) do not require aDSN(Dataset Name) parameter. - Temporary nature: Often used for temporary input, one-off procedures, or control statements that do not require permanent storage.
- Read by the job step: The z/OS operating system or the executing program reads the inline content directly from the job's input stream.
- Delimited: Inline data and procedures are typically marked by specific delimiters (e.g.,
/*forDD *,PENDfor inlinePROCs, or custom delimiters withDD DATA). - Convenience: Simplifies job submission for small amounts of data or simple procedures, reducing the overhead of managing separate datasets.
Use Cases
-
- Providing input data to a program: Using
DD *orDD DATAto supply small input files, control cards, or parameters directly to a COBOL program, utility, or assembler program.
jcl //SYSIN DD * CARD1 DATA CARD2 DATA /*- Defining an inline JCL procedure: Embedding a
PROCdefinition directly within a job stream usingPROCandPENDstatements, rather than calling a cataloged procedure from aPROCLIB.
jcl //MYJOB JOB ... //MYPROC PROC //STEP1 EXEC PGM=IEFBR14 // PEND // EXEC MYPROC- Including control statements for utilities: Supplying
SORTcontrol statements,IDCAMScommands, orDFSMSdsscommands directly within the JCL stream for immediate execution.
jcl //SYSIN DD * SORT FIELDS=(1,10,CH,A) OUTREC FIELDS=(1,10,C'NEW') /*- Temporary job stream modifications: Quickly testing changes to a procedure or data without modifying external libraries or datasets, facilitating rapid prototyping and debugging.
- Providing input data to a program: Using
Related Concepts
Inline constructs are fundamental to JCL and job processing on z/OS. They stand in contrast to cataloged procedures (which are stored in a PROCLIB and invoked by name) and external datasets (which are allocated and referenced via DD DSN=). While external resources offer reusability, persistence, and centralized management, inline elements provide flexibility and self-containment for specific job executions, often interacting closely with utility programs (like SORT, IDCAMS) or application programs that expect sequential input from SYSIN or other DD names.
- Limit usage for small data volumes: Avoid using inline data for large input files, as it can make JCL unwieldy, difficult to read, and cumbersome to modify. Prefer external datasets for larger volumes.
- Use
DD DATAwith custom delimiters for special characters: If inline data contains JCL delimiters (like/*or//), useDD DATA,DLM=xxto specify a unique two-character delimiter to prevent premature termination of the inline dataset. - Document inline procedures thoroughly: If using inline
PROCs, ensure they are well-commented, as they are not easily discoverable or maintainable in a library context. - Prefer cataloged PROCs for reusability and standardization: For frequently used, complex, or critical procedures, always create and catalog them in a
PROCLIBfor better maintainability, version control, and consistency across jobs. - Be mindful of security and sensitive data: Avoid placing sensitive information (e.g., passwords, confidential data) directly in inline JCL or data streams, especially in environments where job streams might be widely accessible.