Re: Dynamic Allocation-Related Question



First - for those who don't recognize the reference to SVC 99 - this is an IBM
mainframe question (not specified by original poster).

If you have a currently supported version of COBOL, then I would *strongly*
recommend switching from an Assembler/SVC 99 approach to using the
COBOL-specific method with "environment variables". See:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3lr30/4.2.3.2

and

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3lr30/4.2.3.1

and

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3pg30/3.4.2.3

(and elsewhere)

--
Bill Klein
wmklein <at> ix.netcom.com
"OppThumb" <calahanj@xxxxxxxxx> wrote in message
news:1149084163.762998.123860@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

To explain up front, I'm working from examples given to me a long time
ago. I have a subroutine program (written in Assembler) to invoke SVC
99 and dynamically allocate files. Even though it was written years
ago, it's still a pretty good little utility program to handle all
types of files on all types of devices.

I also have a copy of a COBOL program that calls the subroutine,
specifically showing me how to allocate output files. Here's the catch
-- it appears that the program only allocates empty output files which
in my example were populated later, in another program.

Does anyone have an example of how to write to a dynamically allocated
output file in the same program where it was allocated? Assuming I have
the DDNAME, DSN, and any other file-related info available to me
(obviously, not in the FILE SECTION), how would I set up the OPEN,
CLOSE and WRITE statements? Can this even be done?

Thanks,

John



.



Relevant Pages

  • Re: Dynamic Allocation-Related Question
    ... I have a subroutine program (written in Assembler) to invoke SVC ... specifically showing me how to allocate output files. ...
    (comp.lang.cobol)
  • Dynamic Allocation-Related Question
    ... I have a subroutine program to invoke SVC ... 99 and dynamically allocate files. ... specifically showing me how to allocate output files. ...
    (comp.lang.cobol)
  • Re: Dynamic Allocation-Related Question
    ... I have a subroutine program to invoke SVC ... I also have a copy of a COBOL program that calls the subroutine, ... specifically showing me how to allocate output files. ...
    (comp.lang.cobol)
  • Re: Prodcuing an output file only on Friday?
    ... There are also several other "COBOL language" options - depending upon exactly ... on Fridays) then you would want to look at the "dynamic file allocation" ... information available with Enterprise COBOL. ... Is it possible to control the output files from a COBOL programs? ...
    (comp.lang.cobol)