COBDATA [ Micro Focus COBOL System Reference, Volume 2 ] MPE/iX 5.0 Documentation
Micro Focus COBOL System Reference, Volume 2
COBDATA
Provides you with the facility to map data files on a global basis, thus
enabling you to place working data files in a directory whose name is not
known until run time.
Syntax:
COBDATA=:directory-name [:directory-name]...
export COBDATA
Parameters:
the initial colon indicates that the current directory is to be
(:) searched first.
directory-name specifies a directory to which you want COBDATA to
point.
Example:
COBDATA=:demo:usr:progs
export COBDATA
Remarks:
COBDATA is considered to be set if there is an environment variable of
this name in your environment space, and its value is non-empty.
If you specify an empty directory this is taken to mean the current
directory and is equivalent to specifying a period (.).
The full mapping order for files is:
1. Any dd_ or cobcap environment mappings
2. Any ASSIGN TO EXTERNAL mappings
3. Any COBDATA environment mappings
For multiple directory paths specified either in the COBDATA environment
variable or a dd_ environment variable, the system searches the first
directory specified followed by a slash (/) as a prefix to the user name.
If the file-name is not found, or is not readable, the search continues
with the next directory until the final directory has been searched. If
no file is found, the first directory is used if a file is to be created.
The COBDATA value string must begin with a colon (:) or your compilation
will not work. dd_ and COBDATA mappings will be ignored for any
file-name which starts with a hyphen (-) or a slash (/). In addition, it
is illegal to have a hyphen anywhere within an environment variable name.
When using this facility, you should not use a file-name that starts with
"COB..."(these are reserved for the COBOL system).
You can use the COBDATA environment variable for files open in any mode
(including OUTPUT) and for fixed or variable length files. If you are
using indexed files, both the data and index files will be in the same
directory.
The COBDATA environment variable affects file deletes, using the rules
given here, as well as file opens.
If you intend to use COBOL development system programs, we recommend that
you first unset COBDATA, as many of these programs open data files and
are thus affected by the value of COBDATA.
MPE/iX 5.0 Documentation