Home > Archive > Cobol > September 2005 > Dynamic Allocation of files in an IBM Environment
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Dynamic Allocation of files in an IBM Environment
|
|
| Giulio Belrango 2005-09-20, 9:55 pm |
|
Does anyone know how to allocate DD statements or DSN=? within a COBOL
program without using JCL.
Thanks...
| |
| Colin Campbell 2005-09-20, 9:55 pm |
| Giulio Belrango wrote:
>
>Does anyone know how to allocate DD statements or DSN=? within a COBOL
>program without using JCL.
>
>Thanks...
>
>
>
In my former shop, we used an Assembler Language subroutine to manage
dynamic allocation. The calling program would pass the information
(DDname and DSName), the subroutine would call the operating system's
dynamic allocation service (SVC 99), and the calling program could then
open, process, and close the file.
COBOL has an option, CBLQDA, which allows or prohibits dynamic
allocation depending on the setting of the option at run time. However,
it is extremely simple minded, and does not allow specifying a data set
name. It essentially allows creation of a temporary data set, which is
deleted at the end of the run unit.
The Assembler Language subroutine is not very difficult to code. I am
now retired, but I might have a copy of the code, since I was the author.
| |
|
|
| news-server.tampabay.rr.com 2005-09-21, 3:55 am |
| BPXWDYN
"Giulio Belrango" <giuliobelrango@rogers.com> wrote in message
news:o-SdnZr3M9YyMq3eRVn-iw@rogers.com...
>
> Does anyone know how to allocate DD statements or DSN=? within a COBOL
> program without using JCL.
>
> Thanks...
>
>
| |
| charles hottel 2005-09-21, 6:55 pm |
| Go to google groups and search comp.lang.cobol for "dynamic allocation".
Several different methods have been posted in the past.
<top post - no more follows>
"Giulio Belrango" <giuliobelrango@rogers.com> wrote in message
news:o-SdnZr3M9YyMq3eRVn-iw@rogers.com...
>
> Does anyone know how to allocate DD statements or DSN=? within a COBOL
> program without using JCL.
>
> Thanks...
>
>
| |
| Joe Zitzelberger 2005-09-23, 7:55 am |
| In article <o-SdnZr3M9YyMq3eRVn-iw@rogers.com>,
"Giulio Belrango" <giuliobelrango@rogers.com> wrote:
>
> Does anyone know how to allocate DD statements or DSN=? within a COBOL
> program without using JCL.
>
> Thanks...
On current versions of the Cobol compiler, you can invoke TSO services
and pass a rexx/clist/tso style "allocate" command.
|
|
|
|
|