GDSX (Extended General Device Support) Manual
User Exit Descriptions
Extended General Device Support (GDSX) Manual—529931-001
9-13
USER^COMMANDS
Considerations
•
The TSCODE-supported FAULT procedure should only be called from the
USER^COMMANDS exit with its noretn parameter equal to 0. See the
description of the FAULT procedure in FAULT on page 8-22.
•
USER^COMMANDS is an integer function called only by TSCODE, never by
USCODE. USCODE returns function values to TSCODE with the TAL RETURN
statement. The permissible returned function values are described under the
status variable above.
•
Pseudo procedures may be called from this procedure.
•
You should modify the I/O buffer pointed to by iocb.bufaddr[x] 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
°
TACL Reference Manual
°
Event Management Service (EMS) Manual
•
If you prepare a response to the SPI command, the address of the response buffer
must be in iocb.bufaddr[x] on return from this procedure.
•
If required, a DEVICE^HANDLER or LINE^HANDLER can be coded to handle
user-defined SPI tokens and notify other user tasks.
Example
This example sends a broadcast message to a GDSX process by means of the SPI
interface. After GDSX receives the message, it is passed to the USER^COMMANDS
exit, where user-supplied code can handle the message.
The example uses a TACL routine in a file called TELLGDS. (The three files
necessary for running this example—TELLGDS, UTACLIB, and USERDDL—are not
included in the installed subvolume; they are listed following these instructions.)
Before running TELLGDS, UTACLIB, which contains macros and routines invoked by
TELLGDS, must be loaded, the make^segment macro must be executed at a TACL
prompt, and a named GDSX process must be running. Directions for running the
example follow.
The make^segment macro loads in ZSPITACL, ZCOMTACL and a file named
ZGDSTACL for Basic GDS (if you use Extended GDS, change the file name to
ZGDXTACL ). Make sure that these files are correctly qualified in the macro definition
in the UTACLIB file.
Then at the first terminal, called $TERM1 in this example, enter:
> LOAD /KEEP 1/ UTACLIB
> MAKE^SEGMENT