--- On Tue, 3/17/09, Tom Marchant <[email protected]> wrote:

> From: Tom Marchant <[email protected]>
> Subject: Re: COBOL and dynamic allocation (my two cents)
> To: [email protected]
> Date: Tuesday, March 17, 2009, 7:58 AM
> On Mon, 16 Mar 2009 19:22:01 -0700,
> Ed Gould <[email protected]>
> wrote:
> 
> >Yahoo is not putting the text of the original message
> for some reason.
> >
> >... 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. 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) 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). Again you could code this nice in 
another language but I suppose if you get fancy you could dynalloc then open it 
and then pass the area back to the program let the program fill the line and 
make a call to the subroutine to write the file. You would also have to allow 
for closing it. It can be done but it is not an afternoon project either as you 
would want to make it really flexible.

Ed




      

----------------------------------------------------------------------
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