Page 1 of 3

Changing a DDNAME in a JCL.

PostPosted: Tue Mar 20, 2012 7:14 pm
by vinodj
Hello,

I have following statement in my JCL.

//SYSOUT DD SYSOUT=*

I want to change the DDNAME SYSOUT to DATAS so that when it will be diaplayed in SPOOL i should be able to see all the messages under DATAS and not SYSOUT . I did following to achieve this:
//DATAS DD SYSOUT=*
For this I am getting error "SYSOUT statement missing".

Please tell me how could this be achieved.

Regards,
Vinod.

Re: Changing a DDNAME in a JCL.

PostPosted: Tue Mar 20, 2012 7:28 pm
by Akatsukami
You can't.

Re: Changing a DDNAME in a JCL.

PostPosted: Tue Mar 20, 2012 7:46 pm
by steve-myers
Akatsukami is correct. The purpose of the DD name in

//SYSOUT DD SYSOUT=*

is to provide a link to a dataset; in this case a dataset that the system will print, but it can be a "regular" dataset. If you want to change the DD name you must change the application, or tell the application to use a different DD name, if that is possible.

Re: Changing a DDNAME in a JCL.

PostPosted: Tue Mar 20, 2012 7:54 pm
by BillyBoyo
What program is writing to SYSOUT? How is it writing to SYSOUT? If the answers are COBOL and DISPLAY then there is a compile option you can use to change the default that DISPLAY uses.

If those are not the answers, then let us know what they are :-)

Re: Changing a DDNAME in a JCL.

PostPosted: Wed Mar 21, 2012 12:10 pm
by vinodj
Hello Billy,

It is COBOL program that is writing to SYSOUT. I will search for this compiler option that can change the default DISPLAY uses.

Thanks.

Re: Changing a DDNAME in a JCL.

PostPosted: Wed Mar 21, 2012 8:01 pm
by Aditya Jain
If you really want to display it as DATAS you can do so by declaring a DATAS file name in the cobol code and perform write(s) to the DATAS file in the cobol code
include the following line in the JCL
//DATAS DD SYSOUT=*

I have not tried this.. I am still a novice at mainframes.. but according to my instincts, this should work..

Re: Changing a DDNAME in a JCL.

PostPosted: Wed Mar 21, 2012 8:18 pm
by Robert Sample
Look in the COBOL Application Programming Guide and check out the OUTDD compiler option. This MAY do what you want, depending upon the COBOL code.

Re: Changing a DDNAME in a JCL.

PostPosted: Thu Mar 22, 2012 7:06 pm
by vinodj
Hello,

I found following on internet for OUTDD and tried to apply this in my JCL but got an error 'Overridden step not found in procedure'

//JS10 EXEC PROC=COB2UC, IBM-supplied proc
// PARM.COB=(OFFSET,OUTDD(DSPOUT)) Optional Parms
//COB.SYSIN DD * Source Program Input source program...

/* The example above shows sample JCL required to execute the compiler via the COB2UC JCL procedure supplied by IBM. In this case, the following options are specified: OFFSET: to request a condensed PROCEDURE DIVISION listing OUTDD: to request that execution time DISPLAY output use a ddname of DSPOUT LANGUAGE: This is a COBOL compiler option. Format: LANGUAGE(xxxxxx) Abbreviations: LANG(xx) IBM-default: LANGUAGE(ENGLISH) LANGUAGE specifies the language that will be used for compiler messages (i.e., for diagnostic messages, message summary headers, the compilation summary, and various headers and notations resulting from the use of compiler options like MAP, XREF, etc.). The language sub-parameters that may be specified are shown Sub-parameter Abbreviation Description

Re: Changing a DDNAME in a JCL.

PostPosted: Thu Mar 22, 2012 7:14 pm
by BillyBoyo
You should talk to your site support about specifying an option which is different from your site's standard.

If you are able, you can just put a CBL OUTDD(your required ddname) card at the beginning of your source, but your site probably has a preferred way to do it. Explain your requirement to them.

Re: Changing a DDNAME in a JCL.

PostPosted: Thu Mar 22, 2012 7:41 pm
by Akatsukami
vinodj wrote:Hello,

I found following on internet for OUTDD and tried to apply this in my JCL but

since you didn't understand what you were doing or why, you failed miserably. You don't actually know JCL, do you?