- ←Prev
- Adding Format Conversion Facilities to the NDF Data Access Library
-
- TOC ↑
A ENVIRONMENT VARIABLES AND TOKENS
A.1 Summary of Environment Variables Used
The following list summarises the environment variables used by the
NDF library to control access to foreign format data. The symbols
FMT
and XTN
are used to represent the names of foreign data formats and NDF extensions respectively. All
environment variable names should be entirely in upper case.
-
NDF_FORMATS_IN
Comma-separated list of format names and associated file extensions, used when
accessing pre-existing datasets. (Mandatory if pre-existing foreign datasets are to be
accessed.)
-
NDF_FORMATS_OUT
Comma-separated list of format names and associated file extensions, used when
accessing new datasets. (Mandatory if new foreign datasets are to be accessed other than
by propagation of format information from a pre-existing dataset.)
-
NDF_FROM_FMT
-
Command to convert a foreign format dataset into an NDF. (Mandatory if datasets in that
format are to be read.)
-
NDF_TO_FMT
-
Command to convert an NDF into a foreign format dataset. (Mandatory if datasets in that
format are to be written or modified.)
-
NDF_DEL_FMT
-
Command to delete a foreign format dataset. (Optional.)
-
NDF_KEEP_FMT
-
Name of the NDF to be used to hold a native format copy of a foreign dataset in cases
where the NDF is to be retained for future use. (Optional.)
-
NDF_TEMP_FMT
-
Name of the NDF to be used to hold a native format copy of a foreign dataset in cases
where the NDF is temporary and will be deleted when the dataset is released. (Optional.)
-
NDF_XTN
Comma-separated list of NDF extensions to be recognised when accessing foreign
datasets. (Optionally required if extension information is to be handled.)
-
NDF_XTN_XTN
-
Comma-separated list of NDF extensions to be recognised when accessing datasets in a
particular foreign format. (Optionally overrides the value of NDF_XTN for that format.)
-
NDF_IMP_XTN
-
Command to import information into an NDF extension. (Optionally required to allow
reading of extension information from foreign datasets.)
-
NDF_IMP_XTN_FMT
-
Command to import information into an NDF extension when accessing datasets in a
particular foreign format. (Optionally overrides the value of NDF_IMP_XTN
for that format.)
-
NDF_EXP_XTN
-
Command to export information from an NDF extension. (Optionally required to allow
writing or modification of extension information in foreign datasets.)
-
NDF_EXP_XTN_FMT
-
Command to export information from an NDF extension when accessing datasets in a
particular foreign format. (Optionally overrides the value of NDF_EXP_XTN
for that format.)
A.2 Summary of Message Tokens Used
The following table summarises all the message tokens used by the NDF library in format conversion
commands, etc:
|
|
| Token | Value |
|
|
|
|
| dir | Directory in which the foreign file resides |
| name | Foreign file name (without directory or extension) |
| namecl | Cleaned version of name (all non-alphanumeric characters replaced by underscores) |
| type | Foreign file extension (with leading ‘.’) |
| vers | Foreign file version number (blank if not supported) |
| fxs | Foreign extension specifier (see §2.4 ) |
| fxscl | Clean version of fxs (all non-alphanumeric characters replaced by underscores) |
| fmt | Foreign format name (upper case) |
| ndf | Full name of the native NDF format copy of the dataset |
| xtn | Name of the NDF extension (upper case) |
|
|
| |
Each environment variable which is used to control access to foreign format data, and which permits
substitution of the above message tokens, is of the form:
where CTX
is the name of a “context” within which message token substitution takes place. The following table
shows which tokens are defined for use within each context:
| | | Token
|
|
| |
|
|
|
|
|
|
|
|
|
|
| | dir | name | namecl | type | vers | fxs | fxscl | fmt | ndf | xtn |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| | FROM | | | | | | | | | | |
| | TO | | | | | | | | | | |
| | DEL | | | | | | | | | | |
| Context | KEEP | | | | | | | | | | |
| | TEMP | | | | | | | | | | |
| | IMP | | | | | | | | | | |
| | EXP | | | | | | | | | | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- ←Prev
- Adding Format Conversion Facilities to the NDF Data Access Library
-
- TOC ↑