Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Dynamic Allocation of files in an IBM Environment
Does anyone know how to allocate DD statements or DSN=? within a COBOL
program without using JCL.

Thanks...




Report this thread to moderator Post Follow-up to this message
Old Post
Giulio Belrango
09-21-05 02:55 AM


Re: Dynamic Allocation of files in an IBM Environment
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.

Report this thread to moderator Post Follow-up to this message
Old Post
Colin Campbell
09-21-05 02:55 AM


Re: Dynamic Allocation of files in an IBM Environment
Assuming you are using a currently supported COBOL compiler, then you can  u
se
(set and use) an "environment variable" to dynamically allocate files in COB
OL.
(Unlike CBLQDA, this allows for creating NEW files that are catalogued *and*
accessing already catalogued files).

See among other references:
http://publibz.boulder.ibm.com/cgi-...gy3pg30/1.9.4.1

http://publibz.boulder.ibm.com/cgi-.../igy3pg30/1.8.3

http://publibz.boulder.ibm.com/cgi-...gy3lr30/4.2.3.1

http://publibz.boulder.ibm.com/cgi-...gy3pg30/3.4.2.3
shows how to set an environment variable, while

http://publibz.boulder.ibm.com/cgi-...gy3lr30/4.2.3.4
and
http://publibz.boulder.ibm.com/cgi-...gy3lr30/4.2.3.2
show what to put in the environment variables (for dynamic file allocations)

--
Bill Klein
wmklein <at> ix.netcom.com
"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 pro
gram
> without using JCL.
>
> Thanks...
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
William M. Klein
09-21-05 02:55 AM


Re: Dynamic Allocation of files in an IBM Environment
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...
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
news-server.tampabay.rr.com
09-21-05 08:55 AM


Re: Dynamic Allocation of files in an IBM Environment
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...
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
charles hottel
09-21-05 11:55 PM


Re: Dynamic Allocation of files in an IBM Environment
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.

Report this thread to moderator Post Follow-up to this message
Old Post
Joe Zitzelberger
09-23-05 12:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 01:58 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.