DD_FILESPEC

Retrieve file specifications

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall DD_FILESPEC(dcs, name, [structure], fls_info, k_info[, ...])

dcs

The repository control structure.

name

The unique file definition name. (a30)

structure

(optional) Contains the name of a structure assigned to the file. (a30)

fls_info

Returned with the file specification data. See the fls_info record in the ddinfo.def file.

k_info

(optional) Returned with the key information for a maximum of 99 access keys. See the k_info record in the ddinfo.def file. (This can be a dimensioned argument. See below.)

The DD_FILESPEC subroutine returns information related to the given file definition, with which the calling routine can create the file. If DD_FILESPEC can’t find the specified file definition, the relevant error code is returned in the control structure.

If you don’t specify the structure name, the name of the first structure assigned to the file is used. If no structures are assigned or if the specified structure is not assigned to the file, the relevant error code is returned in the control structure.

If both the file definition name and the assigned structure are found, the file specification information is returned in fls_info. This information includes the actual open filename, the file type, the structure name, the record size, and the number of keys.

The DD_FILESPEC subroutine returns information for a maximum of 99 access keys. The information for each key is returned in k_info. Optionally, you can pass one k_info argument which is declared as a real (bracketed) array. You must pass it to DD_FILESPEC without the brackets. To obtain textual information about each key, such as a description or null key value, use the DD_KEY subroutine.

DD_FILESPEC returns the keys in sequence number order and assumes that all access keys are defined before any foreign keys. DD_FILESPEC returns either as many keys as the number of k_info arguments passed to it (or the number of elements in the k_info array) or as many keys as it finds, depending on which number is smaller. The fls_info record contains the total number of access keys that are defined for the given file.