Input Stream
In the context of IBM z/OS, an input stream refers to a sequential collection of data, commands, or control statements that are fed into the system or a program for processing. It is typically read by a Job Entry Subsystem (JES) or an application program, often originating from a job submission or a designated input source.
Key Characteristics
-
- Sequential Processing: Data within an input stream is processed in the order it is presented, from beginning to end.
- Diverse Content: Can contain Job Control Language (JCL) statements, program control statements, utility commands, or actual data intended for an application program.
- Source Flexibility: Historically from physical card readers, it is now commonly sourced from datasets,
SYSINDD statements (in-stream data), or network job entry (NJE) transmissions. - JES Interaction: For batch jobs, the Job Entry Subsystem (JES2 or JES3) reads and interprets the JCL portion of the input stream to manage job execution.
- Transient Nature: Often consumed during a single job execution or program run, especially for in-stream data, though the source dataset may persist.
- Delimiter Usage: In-stream data (
DD *orDD DATA) often uses delimiters (e.g.,/*or/*EOF) to signal the end of the input stream for a specific DD statement.
Use Cases
-
- Batch Job Submission: The primary method for submitting JCL to define and execute batch jobs on z/OS, including program execution, utility runs, and data manipulation.
- Providing Program Input: Supplying data to a COBOL, PL/I, or Assembler program via the
SYSINDD statement for processing (e.g., transaction records, configuration parameters). - Utility Control Statements: Passing control statements to z/OS utilities like
IDCAMS(for VSAM management),IEBGENER(for dataset copying), orSORT(for data sorting). - TSO/ISPF Command Execution: While less commonly termed "input stream," commands entered interactively in TSO or ISPF sessions conceptually form an input stream for the terminal monitor program.
- REXX/CLIST Execution: Providing commands or data to REXX execs or CLISTs, often through
SYSTSINor specific file allocations.
Related Concepts
The input stream is fundamental to JCL (Job Control Language), as JCL statements themselves form a significant part of what is submitted in an input stream to define and control batch jobs. The Job Entry Subsystem (JES2/JES3) is responsible for reading, interpreting, and scheduling jobs based on the input stream. The SYSIN DD statement is the specific JCL construct used to define an in-stream data source within a job, allowing programs to read data directly from the input stream. Historically, input streams were processed by card readers, which are now largely emulated.
- Comment JCL and In-stream Data: Use
//*for JCL comments and appropriate commenting within program control statements to enhance readability and maintainability. - Prefer Datasets for Large Data: For large volumes of input data or data that needs to be reused, store it in a sequential dataset or PDS/PDSE member rather than using
DD *(in-stream data). - Validate Program Input: Always include robust data validation within application programs that read from an input stream to handle malformed or unexpected data gracefully.
- Use Symbolic Parameters: Employ symbolic parameters in JCL to make input streams more flexible and reusable, allowing values to be substituted at job submission time.
- Secure Input Sources: Ensure that datasets containing sensitive input streams are properly protected with appropriate RACF or equivalent security profiles to prevent unauthorized access or modification.