11 Jul, 2012

Why SYSOUT DD SYSOUT=*?

 

If Not

Question:

If I want to route the SYSOUT to spool then I need to give //SYSOUT DD SYSOUT=*

The blue one denotes the DD name and what does this yellow one denotes.?

Because if I want to route SORTOUT to spool instead of a PS then we give:

//SORTOUT DD SYSOUT=*

Why we don’t write like this:

//SORTOUT DD SORTOUT=*

 

Answer

syntax of a jcl statement is

//ident      operation  operands

(Above is the generic syntax of a JCL statement. Identifier may be present or absent. In some JCL statements like JOB statement, identifier is mandatory. But not necessary. For example in a concatenated file scenario, first dd name(identifier is mandatory), but remaining jcl statements that show concatenated file names, do not have identifier. Similarly, IF, SET, EXEC statements may have an identifier or may not have. Both ways it is fine.)

 

Example

//JOBLIB    DD DSN=TEST.LOADLIB,DISP=SHR

//          DD DSN=PROD.LOADLIB,DISP=SHR

 

In above, there are 2 JCL statements

//JOBLIB    DD DSN=TEST.LOADLIB,DISP=SHR

And

//          DD DSN=PROD.LOADLIB,DISP=SHR

The first JCL statement has JOBLIB as identifier, DD as operation, and remaining part is full of operands. ‘DD’ refers to data definition

As you see, the second JCL statement does NOT have identifier.

In

//SYSOUT DD SYSOUT=*

Both SYSOUTs are system-defined keywords. They have meanings that were created by mainframe creators.

The first one tells JCL as to which file(actually dd name) to route, and the second SYSOUT tells as to where to route the contents of it. (‘SYSOUT’ means SYSTEM OUTPUT) …

First SYSOUT ——- which dd name

Second SYSOUT —where to route, which physical device to route to

THE SECOND SYSOUT

The second one can be coded against any dd name

Like

//SORTOUT  DD SYSOUT=M

//SYSPRINT  DD SYSOUT=*

//XYZ  DD SYSOUT=P

//FILE    DD DSN=A.B.C,DISP=(NEW,CATLG,DELETE),DCB=(…),SPACE=(….)

 

As you know, physical filename has a connection to logical filename  via ddname.

In above 4 examples,

I want to route the ddnames

  • SORTOUT to a physical device that is identified by SYSOUT=M
  • SYSPRINT to a physical device that is identified by SYSOUT=*
  • XYZ to a physical device that is identified by SYSOUT=P
  • FILE to a physical device that is identified by a physical file A.B.C.

 

THE FIRST SYSOUT

The first SYSOUT was created by creators of mainframe to send, by default, all DISPLAY statements to a ddname called SYSOUT……

We can have

//SYSOUT    DD DSN=A.B.C,DISP=(NEW,CATLG,DELETE),DCB=(…),SPACE=(….)

 

In this case it means we want to route all DISPLAY statements to a device that is identified by a physical file A.B.C. And this routing is done via SYSOUT.

Tags:

No Responses to "Why SYSOUT DD SYSOUT=*?"

Subscribe to Comment follow up

Comment Form

Trackbacks