/********************************************************************/
/* typedef _Packed struct Qca_PCMD_CPOP0100 { */
/* int Command_Process_Type; */
/* char DBCS_Data_Handling; */
/* char Prompter_Action; */
/* char Command_String_Syntax; */
/* char Message_Key[4]; */
/* char Reserved[9]; */
/* } Qca_PCMD_CPOP0100_t; */
/********************************************************************/
record("cl_command: Command:\n");
buffer(Command, strlen(Command));
memset(cpop0100_out, 0x00, sizeof(cpop0100_out));
memset(&cpop0100, 0x00, sizeof(Qca_PCMD_CPOP0100_t));
cpop0100.Command_Process_Type = 0;
cpop0100.DBCS_Data_Handling = '0';
cpop0100.Prompter_Action = '0';
cpop0100.Command_String_Syntax = '0';
memset(&esErrCode, 0x00, sizeof(esErrCode));

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

esErrCode.Bytes_Provided = 0L; /* Force exception to be signalled */
QCAPCMD(Command, strlen(Command), &cpop0100,
sizeof(Qca_PCMD_CPOP0100_t), "CPOP0100", cpop0100_out,
sizeof(cpop0100_out) - 1, &cpop0100_len, &esErrCode);
return;
}
/* Function Specification *********************************************/
/* */
/* Function Name: Pad */
/* */
/* char *pszString - null terminated string, may or may not have */
/* blanks */
/* */
/* int iLength - maximum length to pad the string (includes NULL */
/* terminator). A NULL terminator WILL be added! */
/* */
/* iLength should be where you want the NULL term. */
/* */
/* Descriptive Name: pads a string with blanks */
/* */
/* End Function Specification *****************************************/

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

592 OS/400 TCP/IPConfiguration and Reference V4R4