Retrieve file information

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)


xcall DD_FILE(dcs, DDL_TEXT, field, data)


xcall DD_FILE(dcs, DDL_STRS, names_req, array, [start], [#names][, array2])


The repository control structure.


Returns general file information and sets the current file.


The unique file definition name. (a30)


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.


Returns textual information about the current file.


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)


Returned with the requested textual data.


Returns a file’s assigned structure names.


The number of assigned structure names requested. (d3)


Returned with the array of assigned structure names. ((*)a30)


(optional) Contains the assigned structure name at which to start. (a30)


(optional) Returned with the number of assigned structure names. (d3)


(optional) Returned with the array of corresponding ODBC table names. ((*)a30)

The DD_FILE subroutine returns information about file definitions. There are three ways to call DD_FILE:


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.


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.


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.