Example

void *fetch_ptr;
typedef void exit_U(char *ProdID, char *UsrPgm, void *BufPtr, char *DbgDDn);
#pragma linkage(exit_U, OS)
exit_U *exit_ep;
char *exit_name;
char event_data[1024];
char *data_item1 = Fred=Yes;
char *data_item2 = Barney=No;
int i;

i = 4;
*(short *)&event_data[i] = strlen(data_item1); 
memcpy(data_buffer + i + 2, data_item1, strlen(data_item1)); 
i += (2 + strlen(data_item1));

*(short *)&event_data[i] = strlen(data_item2); 
memcpy(data_buffer + i + 2, data_item2, strlen(data_item2)); 
i += (2 + strlen(data_item2));

*(int *)&event_data[0] = i;

// Set exit_name to the current EVENTPROCESSINGEXIT option value...

fetch_ptr = (void *)fetch("IPVEPSND");
if (fetch_ptr) {
  exit_ep = (exit_U *)fetch_ptr;
  exit_ep("XYZ", exit_name, event_data, 0);
}