On Tue, 17 Mar 2009 21:36:57 -0700, Ed Gould wrote:

>--- On Tue, 3/17/09, Tom Marchant wrote:
>
>> Ed Gould wrote:
>>
>> >
>> >... I had a programmer come to me a few years ago and
>> he wanted
>> >to write a report that could go to multiple places.
>> .... To make things
>> >really simple just code a DDNAME and a DD and
>> >sysout=whatever,dest=newyork1
>> >ddname2 DD sysout=whatever,dest=newyork2 etc etc and
>> >then in you COBOL program have an FD for each possible
>> destination.
>>
>> You only need one DCB, and can specify multiple
>> destinations using
>> // OUTPUT statements.
>
>
>If I understand what you are saying then no. 

I'll try to explain it for you.   Read on.

>For each dd statement there must be a corresponding fd (if the 
>FD is in the cobol program but you could put the DCB in a 
>subroutine and not have the same issues)

Not sure what you mean by that, Ed.  Of course a DCB is needed to open each
DD.  FD is the way you generate a DCB in COBOL.  Putting the DCB in a
subroutine wouldn't eliminate any "issues".

>one side mention is here you would have to make sure to use 
>free=close else you could run out of tiot space (depending how 
>many dcb/fd's you have). 

If you are coding the DD statements in JCL, as you proposed, FREE=CLOSE will
not make any difference in the TIOT space.  The TIOT is built during
allocation.  The case where FREE=CLOSE might be important with regard to
TIOT space is if you are doing dynamic allocation.

If you want your output to go to multiple destinations, you could code
something like this in your JCL:

//STEP1  EXEC  PGM=whatever
//DEST1  OUTPUT sysout characteristics for destination 1
//DEST2  OUTPUT sysout characteristics for destination 2
...
//OUTPUT  DD  SYSOUT=A,OUTPUT=(DEST1,DEST2,...)

One DD, multiple destinations.

-- 
Tom Marchant

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to