DD_RELATION

Retrieve relation information

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall DD_RELATION(dcs, DDR_LIST, names_req, array, [start][, #names])

or

xcall DD_RELATION(dcs, DDR_INFO, name, from_key, to_struct, to_key)

dcs

The repository control structure.

DDR_LIST

Returns the current structure’s relation names.

names_req

The number of relation names requested. (d2)

array

Returned with the array of relation names. ((*)a30)

start

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

#names

(optional) Returned with the number of relation names. (d2)

DDR_INFO

Returns general relation information.

name

The unique relation name. (a30)

from_key

Returned with the name of the relation’s “from” key. (a30)

to_struct

Returned with the name of the relation’s “to” structure. (a30)

to_key

Returned with the name of the relation’s “to” key. (a30)

The DD_RELATION subroutine returns information about relations for the current structure. There are two ways to call DD_RELATION:

You must have previously set the current structure with the DD_STRUCT subroutine. The same DD_STRUCT call should also have told you the number of relations that exist.

DDR_LIST

If you pass DDR_LIST, the DD_RELATION subroutine returns an array of relation names for the current structure. The names are returned in alphabetical order, starting with either the first name found or the specified name. DD_RELATION returns as many relation 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 you are requesting.

DDR_INFO

If you pass DDR_INFO, this subroutine reads the specified relation. If that relation is not found, the relevant error code is returned in the control structure. If it is found, general relation information is returned.