Dynamic Allocation
Introduction
Dynamic allocation is the system facility that permits data sets
to be allocated for use by your program as they are required.
When they are no longer needed, your program can request that
dynamic allocation routines "unallocate" or free the data sets.
In contrast, data sets allocated using JCL DD statements are
allocated statically. That is, they are allocated for your
program's use possibly well before your program requires them;
and they may be held by your program long after the allocations
are necessary, resulting in loss of concurrent use.
To eliminate this problem, Shadow REXXTOOLS provides
implementations of the
ALLOCATE
and
FREE
commands.
These commands are implemented under the
REXXTOOL
host command environment (address REXXTOOL). Like their TSO
counterparts, the Shadow REXXTOOLS ALLOCATE and FREE commands are
invoked by coding host command expressions in REXX programs.
Unlike the TSO commands, the Shadow REXXTOOLS commands are strictly
for use under Shadow REXX programs.
Using the Shadow REXXTOOLS ALLOCATE command you can:
-
Create new data sets.
The data sets can be assigned attributes (e.g., DCB) directly on
the command, or indirectly by referring to model data sets or SMS
classes.
-
Associate a ddname with a data set.
The ddname can be referenced by the EXECIO command and by the
Shadow REXXTOOLS VSAM functions.
-
Concatenate several data sets.
The data sets can be grouped together under one ddname.
-
Allocate SYSOUT data sets.
The output can be routed to writers, printers, and other systems.
Using the Shadow REXXTOOLS FREE command you can:
-
Disassociate a data set with your program.
The data set then becomes available for other users in the
system.
-
Override the disposition and destination of data sets.
The new values override the values that were specified at data
set allocation.
In addition, the Shadow REXXTOOLS ALLOCATE and FREE commands return
extensive diagnostic information to your REXX program, including
the text of allocation messages. You may use this information to
drive conditional logic in your programs.
Differences from TSO/E Dynamic Allocation
The Shadow REXXTOOLS
ALLOCATE
command differs from the TSO/E
ALLOCATE command in the following respects:
-
Generation data sets are supported by the REXXTOOLS ALLOCATE
command. They are not supported by TSO ALLOCATE.
-
The ALTFILE and USING keywords are not supported by the REXXTOOLS
ALLOCATE command.
-
The abbreviations for keywords are not always the same. In the
service descriptions that follow, the minimum acceptable
abbreviation for a keyword is shown in bold and underlined.
-
The return codes are different and there are more of them. Refer
to the section
"Returned Information"
under the description for the ALLOCATE command.
-
The handling of messages is different. Messages are returned in
special variables, and message printing is suppressed by the
OPTIONS NOMSGS command.
-
System prompting for additional information is not supported.
-
The REUSE keyword always frees and reallocates the ddname.
-
In some cases the TSO ALLOCATE command will assume keyword
values. The Shadow REXXTOOLS implementation assumes only the
following:
-
If you specify a data set status of NEW, a disposition of CATALOG
will be provided automatically.
-
If you do not specify a status (OLD, NEW, SHR, MOD), but you do
specify LIKE, or any of the DCB or space-related keywords, a
status of NEW is provided automatically.
The Shadow REXXTOOLS
FREE
command differs from the TSO/E FREE
command in the following respects:
-
The ATTRLIST and OUTDES keywords are not supported.
-
The abbreviations for keywords are not always the same. In the
service descriptions that follow, the minimum acceptable
abbreviation for a keyword is shown in bold and underlined.
-
The return codes are different and there are more of them. Refer
to the section
"Returned Information"
under the description for the FREE command.
-
The handling of messages is different. Messages are returned in
special variables, and message printing is suppressed by the
OPTIONS NOMSGS command.
-
System prompting for additional information is not supported.
Service Descriptions
The sections that follow describe the syntax and operation of the
Dynamic Allocation commands.
ALLOCATE
FREE
© Copyright 1998 by Open Software Technologies, Inc.