EMS Manual
Example of Reporting Events
EMS Manual—426909-005
B-10
The TACL Source File
too_long((char *)in_fname, io_time, in_msg,
strlen (in_msg), io_calls);
/* .... Do subsystem processing on input .........*/
if (strcmp (in_msg, "quit") == 0)
bQuit = true;
/* Get next input */
start_io = end_io;
}
PROCESS_STOP_( (short *) &outputList.z_phandle );
}
The TACL Source File
This file contains the TACL source code:
?TACL MACRO
== File name: TACLSRC
==
#FRAME
==================================================================
== Define variables and initialize variable values
==
#PUSH vars log^subvol
#PUSH coll^err coll^name coll^reply coll^req
#PUSH ems^err
#SET coll^name $acol
#SET log^subvol $data.acollog
== Load SPI and EMS defined variables
== Use the ATTACHSEG command to gain access to an existing TACL segment file.
ATTACHSEG SHARED $dsv.zspisegf.zspisegf :spidir
ATTACHSEG SHARED $dsv.zspisegf.zemssegf :emsdir
== Set USE so that TACL will find the variables in :spidir and :emsdir
== USE also makes sure that : :UTILS :UTILS:TACL are included in #USELIST
USE [#USELIST] :spidir :emsdir
== Load XOURTACL definitions
[#IF NOT [#VARIABLEINFO /EXISTENCE/ xour^val^ourco] |THEN|
#LOAD /LOADED vars/ xourtacl
]
== Initialize EMS ssid variable
#PUSH ems^ssid
#SET EMS^SSID [ZSPI^VAL^TANDEM].[ZSPI^SSN^ZEMS].[ZEMS^VAL^VERSION]
== Initialize our SSID
#PUSH our^ssid
#SET our^ssid [XOUR^VAL^OURCO].[XOUR^SSN^XOUR].[XOUR^VAL^VERSION]
== Define event buffer
#DEF event^buf STRUCT LIKE zems^ddl^evt^buffer;
== Define a structure for STRING token value
[#DEF stringdata STRUCT
BEGIN
UINT byte^len ; == string byte length
CHAR data (0:131); == string data