JCL Input & Output Statements
JCL Input & Output Statements
In Job Control Language (JCL), the input and output statements are used to define the data sets or files that a batch job (a job that executes a COBOL program) will use during its execution. These statements specify where the input data is coming from and where the output data should be written to.
These input and output statements are required when the program is accepting input or writing output. In all other scenarios, these statements are act as dummy statements. The JCL input and output statements are -
SYSIN Statement | The SYSIN DD statement is used to provide the input source for programs or utilities in the JCL.
It is typically used to provide control statements or data to the program that is being executed.
Syntax -
//SYSIN DD DSN=input.dataset.name,DISP=SHR
Example - SYSIN statement with a dataset.
|
SYSOUT Statement | The SYSOUT DD statement is used to specify where to route the output produced by a job step.
It defines the destination for the output, which can include printing on paper, writing to a dataset, or discarding the output.
Syntax -
//SYSOUT DD destination-information
Example - Writing to a dataset (MATEPK.SYSOUT.PS).
In this example, the output is directed to a dataset named "MATEPK.SYSOUT.PS".
|
