JCL SYSIN and SYSOUT Parameter

JCL SYSIN and SYSOUT Parameter

In most of the JCL, you will find the SYSIN and SYSOUT Parameter. Let us understand this in detail-

SYSIN Parameter

SYSIN parameter is optional Keyword parameter. This is one of the ways to send the data to the program from the JCL. We have to code ACCEPT statement in the COBOL Program to accept the data which is passed using the SYSIN Parameter of the JCL.

Syntax 1 for SYSIN:
//SYSIN DD *
values…
/*

DD * denotes In-stream data

Syntax 2 for SYSIN:
//SYSIN DD DATA
values…
//*

Note/warning/suggestion/improvement:
There is another way of passing the data to the program which is ‘PARM’.If both SYSIN and PARM are defined in the JCL, then PARM always overrides the values in SYSIN.

SYSOUT Parameter

SYSOUT parameter is an optional keyword parameter which is used to display the output of the JCL in the SPOOL Area or to an Output Class.

Syntax 1 for SYSOUT:
//DDNAME DD SYSOUT=*

SYSOUT=* denotes that the output will be displayed in the class which is defined in the MSGCLASS. If you do not define MSGCLASS, the system will by default define a particular Class.

Syntax 2 for SYSOUT:
//DDNAME DD SYSOUT=P

SYSOUT=P denotes that the output will be displayed in a particular Class ‘P’.

P – Denotes any valid class from A-Z

Example of SYSOUT=*

SYSOUT DD SYSOUT=* in JCL

Here, we gave SYSOUT DD SYSOUT=*

and MSGCLASS is not defined so, the output will be sent to the default Class which system defines for MSGCLASS

Which Class will contain the Output?

Here, the system has defined a default class ‘X’ for the MSGCLASS. Hence, the output is sent to class ‘X’

Example of SYSOUT=P

SYSOUT particular class

Here, we gave SYSOUT DD SYSOUT=C

So, the output will be sent to the Class ‘C’

Proof of the OUTPUT being send to CLASS C

Here, you can see that the output is sent to class ‘C’ as expected.

Tutorials for all brains!