/******************************************************************/
/* Open database file for permanent log of test results. */
/******************************************************************/
sprintf(pcOpenFile, "%s(%s)", pszDataArea, pszLog);
sprintf(pcOpenParms, "a+, lrecl=%d, recfm=v", RECORD_WIDTH);
pLog=fopen(pcOpenFile, pcOpenParms);
fwrite(acMsg, 1, strlen(acMsg), pLog);
fclose(pLog);
} /* endif */
/********************************************************************/
/* Exit */
/********************************************************************/
record("wsgexit: <<<<< exit\n");
exit(0);
} /* End main */

Figure 302. Sample WSG Server Logon Exit Program (Part 28 of 50)

/**********************************************************************/
/*@function buffer() */
/* */
/* Parameters: */
/* */
/* char *buffer - points at buffer to dump */
/* int length - length of buffer to dump */
/* */
/* Description: */
/* */
/* Dumps out a buffer in both hex and readable form. */
/* */
/* 1934D8E3 D4E3E2D7 C3F0F0F2 40404040 |..QTMTSPC002 | */
/* 40404040 40404040 40404040 40404040 | | */
/* 00000000 00000000 00000000 00000000 |................| */
/**********************************************************************/
void buffer(char *Buffer, int Length)
{int iRow = 0;

Figure 302. Sample WSG Server Logon Exit Program (Part 29 of 50)

584 OS/400 TCP/IPConfiguration and Reference V4R4