DD_FORMAT

Retrieve format information

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall DD_FORMAT(dcs, DDM_INFO, name, type, format)

or

xcall DD_FORMAT(dcs, DDM_LIST, names_req, array, [start][, #names])

or

xcall DD_FORMAT(dcs, DDM_SINFO, sname, stype, sformat)

dcs

The repository control structure.

DDM_INFO

Returns general global or predefined format information.

name

The unique global or predefined format name. (a30)

type

Returned with the global format type. (a1)

format

Returned with the global format string. (a30)

DDM_LIST

Returns the current structure’s format names.

names_req

The number of structure-specific format names requested. (d4)

array

Returned with the array of structure-specific format names. ((*)a30)

start

(optional) Contains the structure-specific format name at which to start. (a30)

#names

(optional) Returned with the number of structure-specific format names. (d4)

DDM_SINFO

Returns general structure-specific format information.

sname

The structure-specific format name. (a30)

stype

Returned with the structure-specific format type. (a1)

sformat

Returned with the structure-specific format string. (a30)

The DD_FORMAT subroutine returns information about global, predefined, and structure-specific format definitions. (Predefined formats are the date and time formats.) There are three ways to call DD_FORMAT:

You must have previously set the current structure with the DD_STRUCT subroutine to access information about structure-specific formats. You should know the number of structure-specific formats that exist from that same DD_STRUCT call.

DDM_INFO

If you pass DDM_INFO, this subroutine reads the specified global or predefined date or time format. (It searches for a predefined format first.) If that format is not found, the relevant error code is returned in the control structure. If it is found, information about the format is returned.

DDM_LIST

If you pass DDM_LIST, this subroutine returns an array of format names for the current structure. The names are returned in alphabetical order, starting with either the first name found or the specified name. DD_FORMAT returns either as many format names as it finds or as you request, depending on which is smaller. The actual number of names in the array can be returned in #names.

DDM_SINFO

If you pass DDM_SINFO, this subroutine reads the specified structure-specific format. If that format is not found, the relevant error code is returned in the control structure. If the format is found, information about the format is returned.