GDSX Manual

User Exit Descriptions
Extended General Device Support (GDSX) Manual134303
9-21
USER^START
Users should modify the I/O buffer pointed to by scf-buffer only with DSM
procedures (SSPUT, SSGET, and so on). See the SPI Programming Manual. Other
references that may be helpful are:
°
GDS Management Programming Manual
°
Event Management Service (EMS) Manual
USER^START
When this user exit is called, TSCODE is about to open an SU and start an associated
DEVICE^HANDLER task. USER^START allows you to participate in the
configuration of SUs.
Depending on the setting of the USERSTARTSU parameter, this procedure is called
when the TSCODE monitor task is about to open an SU. Thus USER^START allows
you to initialize or manipulate data, including DCB variable settings, before the file is
opened and an associated DEVICE^HANDLER task is created.
If the USERSTARTSU configuration parameter is equal to 1, whenever the monitor task
is about to open a dynamic or preconfigured SU—whether the SU is under a LINE or
not—the OPEN^MESSAGE procedure will call USER^START.
If USERSTARTSU is not equal to 1, whenever the monitor task is about to open an SU,
OPEN^MESSAGE will call USER^START only if the SU is configured under a LINE.
The default value of USERSTARTSU guarantees that applications converted from older
versions of GDSX can execute as before: USER^START is invoked only for SUs under
a LINE.
When TSCODE calls USER^START for an SU, the processing is as follows:
TSCODE receives an open message for the SU.
A DCB is assigned and initialized to manage communication between the opener
and the file associated with the SU.
TSCODE calls USER^START, passing a pointer to the DCB.
TSCODE expects USER^START to return the address of the DCB in the openid
parameter.
After USER^START returns, TSCODE opens the SU.
If the SU is not configured under a LINE (determined by the value of zero for
dcb.lineno), TSCODE opens the file associated with the SU, creates a
DEVICE^HANDLER task, stores openid in tcb.openid, and stores the Guardian file
number for the open file in tcb.term.