DD_FILE
WTSupported in traditional Synergy on Windows
|
WNSupported in Synergy .NET on Windows
|
USupported on UNIX
|
VSupported on OpenVMS
|
xcall DD_FILE(dcs, DDL_INFO, name, fl_info)
or
xcall DD_FILE(dcs, DDL_TEXT, field, data)
or
xcall DD_FILE(dcs, DDL_STRS, names_req, array, [start], [#names][, array2])
Arguments
dcs
The repository control structure.
DDL_INFO
Returns general file information and sets the current file.
name
The unique file definition name. (a30)
fl_info
Returned with the file data (including file type, open filename, number of assigned structures, and name of the first assigned structure). See the fl_info record definition in the ddinfo.def file.
DDL_TEXT
Returns textual information about the current file.
field
A field in the fl_info record that indicates what type of textual information should be returned in data (if the field is non-zero):
fli_desc = Short description. (a40)
fli_ldesc = Long description. (a1800)
fli_utext = User-defined text string. (a60)
fli_portable = Portable integer specifications. (a120)
fli_filetext = File text. (a1800)
data
Returned with the requested textual data.
DDL_STRS
Returns a file’s assigned structure names.
names_req
The number of assigned structure names requested. (d3)
array
Returned with the array of assigned structure names. ((*)a30)
start
(optional) Contains the assigned structure name at which to start. (a30)
#names
(optional) Returned with the number of assigned structure names. (d3)
array2
(optional) Returned with the array of corresponding ODBC table names. ((*)a30)
Discussion
The DD_FILE subroutine returns information about file definitions. There are three ways to call DD_FILE:
- DDL_INFO enables you to retrieve general information about a file.
- DDL_TEXT enables you to retrieve textual information about a file.
- DDL_STRS enables you to retrieve the file’s assigned structure names.
DDL_INFO
If you pass DDL_INFO, the DD_FILE subroutine reads the specified file. If that file is not found, the relevant error code is returned in the control structure. If it is found, the file name is recorded in the control structure and general information is returned in fl_info.
Once a file has been selected, the other functions are valid.
DDL_TEXT
The DDL_TEXT function is used to obtain textual or variable-length information about the file. For each type of textual information, a corresponding field in the fl_info record is non-zero. For example, if the fli_desc field in the fl_info record is non-zero, a short description exists for the file. If you pass DDL_TEXT along with the non-zero field, the corresponding textual information is returned.
DDL_STRS
If you pass DDL_STRS, this subroutine returns an array of structure names assigned to this file. If only one structure is assigned, that name is returned in fl_info from the DDL_INFO function. The names are returned either in the order in which they were assigned, starting with the first one, or starting with the specified name. DD_FILE returns as many structure names as are found or as are requested, whichever is smaller. The actual number of names in the array can be returned in #names. You must ensure that the buffer passed is large enough to hold the number of names that you are requesting.