The dipterm instruction specifies that a DIP receives a message when the script terminates.
Synopsis
dipterm(type.dip[,flag])
Description
The dipterm instruction specifies to TSM which DIP receives a termination message when the script terminates. A DIP number or name may be used for type.dip. The dipterm instruction may be called repeatedly with different DIP numbers or names. The termination message goes to all DIPs specified.
The optional flag may be used to turn off a dipterm setting. The valid values for the flag are:
1 |
Set dipterm for dip (default). |
0 |
Reset dipterm for dip. |
dipterm synopsis
/* message structure for dipterm message */
struct ms_univ {
struct mbhdr hd;
long arg[4];
};
dipterm message structure
arg[0], as shown in the following table, displays why the script terminated. As defined in tsm_dip.h, there are several causes for a script to terminate.
NORMALTERM |
A quit instruction in the script was executed. |
DISCONTERM |
The call was disconnected. |
SCRFAILTERM |
An error exists in the script code. |
MTCTERM |
The MTC process seized the channel on which the script is running. |
EXECTERM |
The script executed another script. |
arg[1] is set to the value specified in the quit or exec instructions.
Example
The following example causes DIP0 to receive a termination message when the script terminates.
dipterm(0)
The following example causes the DIP called bankdip to receive a termination message when the script terminates.
dipterm("bankdip")