DD_INIT

Initialize an information session

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall DD_INIT(dcs, [main_file], [text_file], [main_open][, text_open])

dcs

The repository control structure.

main_file

(optional) Contains the name of the repository main file to open. (a255)

text_file

(optional) Contains the name of the repository text file to open. (a255)

main_open

(optional) Returned with the name of the repository main file opened. (a255)

text_open

(optional) Returned with the name of the repository text file opened. (a255)

The DD_INIT subroutine initializes an information session for a particular repository. It must be the first subroutine called when using the Repository subroutines. It initializes the repository control structure that is passed to it.

You can optionally specify the name of the repository main and text files to use. If the main_file and text_file arguments are not passed or are blank, DD_INIT opens the repository main and text files specified by the environment variables RPSMFIL and RPSTFIL. If these environment variables are not set, DD_INIT opens the repository files found in the RPSDAT directory (rpsmain.ism and rpstext.ism).

Once the files are found, their channel numbers are stored in the control structure. If main_open and text_open are passed, they are returned with the names of the opened files. If no files are found or if the specified files can’t be opened, an error is returned in the control structure. One of three error codes (defined in ddinfo.def) is returned: E_OPNERRM, E_OPNERRT, E_BADVERS.

If the error code in dcs is non-zero after calling DD_INIT, the contents of main_open and text_open are undefined.