EMS Manual
Example of Retrieving Event Messages
EMS Manual—426909-005
A-26
C Source File
error;
/* install loc */
char distr_prog_file[25] = "$SYSTEM SYSTEM EMSDIST ";
/* starts blank */
char distr_proc_name[25] = " ";
char *distr_qual = &distr_proc_name[8]; /* for #zspi
*/
int cpu_num,
used_len,
ems_err;
/* spi buffers and such */
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
char evt_text_buf[EVT_TEXT_LEN * NUM_EVT_LINES];
int actual_len[NUM_EVT_LINES];
/* Declare the ssids using the typedefs from the DDL
output */
zems_val_ssid_def zems_val_ssid;
myap_val_ssid_def myssid;
char coll_name[25] = "$0 ";
char filt_name[25] = "$SYSTEM FILT MYAPFOBJ";
#pragma PAGE "init_startup()"
/* -------- init_startup -------------
* Recreate the startup structure discarded by C.
* C retains the information we need and it can be accessed
* by GETENV(). Pass: nothing. Returns: a pointer to the
* dynamic storage for ci_startup msg.
*/
CISTART *init_startup(void)
{
CISTART *ci_startup;
lowmem char ExternFile[34];
lowmem int TempDefaults[9];
ci_startup = (CISTART *) malloc( sizeof(CISTART) );
if (ci_startup == NULL)
DEBUG();