OSI/AS Management Programming Manual
Event-Retrieval Example
Sample Programs
C–40 056785 Tandem Computers Incorporated
#include "$system.zspidef.ZOSIC" nolist
#pragma PAGE "Globals and defines"
/* The following defines are used for ZEMS structures to
* shorten names.
*/
#define EMSBUFDEF zems_ddl_msg_buffer_def
#define SPIERRDEF zspi_ddl_error_def
#define FALSE 0
#define TRUE (!FALSE)
/* The following structure is used to pass a startup
* message to the process started by NEWPROCESS.
* The C initialization code conveys this information as
* argc/argv information and disposes of the original
* startup message.
*/
typedef struct startup_msg {
int msgcode;
int defaults[8];
int infile[12];
int outfile[12];
char params[35]; /* Leave space for some parameters. */
} CISTART;
/* ---------- Globals ----------------- */
/* recfn; is not used in the C version.
* C processes the startup message.
*/
int distr; /* distributor file number */
error;
char distr_prog_file[25] = "$SYSTEM SYS11 EMSDIST ";
/* install loc */
char distr_proc_name[25] = " ";
/* initially blank */
char *distr_qual = &distr_proc_name[8]; /* for #zspi */
int used_len,
ems_err;
/* SPI buffers */
int spi_err;
EMSBUFDEF *spi_buf;
EMSBUFDEF *sav_buf;
SPIERRDEF *err_buf;
int ibuflen = ZEMS_VAL_BUFLEN;
int msgcount = 0;
int msglimit = 0; /* 0 represents no limit.
* 100 is typical. */
#define EVT_TEXT_LEN 78
#define NUM_EVT_LINES 2