/********************************************************************/
typedef struct _Dtaara {
/*****************************************************************/
/* typedef _Packed struct Qwc_Rdtaa_Data_Returned { */
/* int Bytes_Available; */
/* int Bytes_Returned; */
/* char Type_Value_Returned[10]; */
/* char Library_Name[10]; */
/* int Length_Value_Returned; */
/* int Number_Decimal_Positions; */
/* char Value[]; commented out */
/* } Qwc_Rdtaa_Data_Returned_t; */
/******************************************************************/
Qwc_Rdtaa_Data_Returned_t returned;
char contents[257];
} Dtaara_t;
Dtaara_t dtaara;
ERRSTRUCT esErrCode;
Figure 302. Sample WSG Server Logon Exit Program (Part 15 of 50)
/********************************************************************/
/* Code */
/********************************************************************/
fException = fFalse; /* Exception was trapped by signal() */
fRemoveEscapeMsg = fFalse; /* Remove exception msg from joblog */
fDebug = fFalse; /* Log debug msgs to DEBUG member */
fLogMsg = fFalse; /* Log connect msg to QTCP msg queue */
fLogFile = fFalse; /* Log connect msg to SRCPF or PF */
signal(SIGALL, &handler); /* Trap all signals with our handler */
/********************************************************************/
/* Read fixed data area to see if debug logging is active. We */
/* force exceptions to be signalled so we know if the data area */
/* exists or not by checking the fException flag. */
/********************************************************************/
Figure 302. Sample WSG Server Logon Exit Program (Part 16 of 50)
/********************************************************************/
memset(&esErrCode, 0x00, sizeof(esErrCode));
esErrCode.Bytes_Provided = 0L; /* Force exception to be signalled */
memset(&dtaara, 0x00, sizeof(dtaara));
dtaara.returned.Bytes_Available = sizeof(dtaara);
fException = fFalse; /* Initialize - reset in handler */
fRemoveEscapeMsg = fTrue; /* Initialize - want to hide errors */
QWCRDTAA(&dtaara, sizeof(dtaara), pszDtaara, -1,
sizeof(dtaara.contents) - 1, &esErrCode);
fRemoveEscapeMsg = fFalse; /* Reset - want to see errors */
/********************************************************************/
/* If data area found and contents exist, process contents */
/********************************************************************/
if (!fException && dtaara.returned.Bytes_Returned) {
if (NULL != strstr(dtaara.contents, "*MSGQ")) {
/******************************************************************/
Figure 302. Sample WSG Server Logon Exit Program (Part 17 of 50)
AppendixE. TCP/IP Application Exit Points and Programs 579