for (iCol = 0; iCol < 16; iCol++) {
/****************************************************************/
/* One printable character displays two hexadecimal characters */
/****************************************************************/
if (iCol + (iRow * 16) >= Length) {
/**************************************************************/
/* No more data - just fill rewsgexiting positions with blanks */
/**************************************************************/
*pBuff='';pBuff++;
*pBuff='';pBuff++;
} else {
/**************************************************************/
/* Print actual data */
/**************************************************************/
sprintf(pBuff, "%02X", Buffer[iCol + (iRow * 16)]);
pBuff += 2;
} /* endelse */

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

/****************************************************************/
/* Add a space separator every 4 hex bytes */
/****************************************************************/
if (iCol%4==3){
*pBuff='';pBuff++; /* Pad character */
} /* endif */
} /* endfor */
/******************************************************************/
/* Print the same 16 bytes as the "readable" text section */
/******************************************************************/
*pBuff='';pBuff++;
*pBuff = '|'; pBuff++; /* Left text bar */
/******************************************************************/
/* Print 16 bytes of the buffer as readable text section */
/* Secondary loop for columns */
/******************************************************************/
iLast = 0; /* Bytes last line */
for (iCol = 0; iCol < 16; iCol++) {
if (iCol + (iRow * 16) >= Length) {

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

586 OS/400 TCP/IPConfiguration and Reference V4R4