Returns the message substitution data for the top-level (the most recent) message identified by the error handle provided. This message attribute only pertains to messages returned from the iSeries™ server. The substitution data are inserted into the substitution variable fields defined for the message.
unsigned int CWB_ENTRY cwbSV_GetErrSubstText( cwbSV_ErrHandle errorHandle, char *substitutionData, unsigned long substitutionDataLength, unsigned long *returnLength);
The following list shows common return values.
iSeries server messages may be added to the error handle when using the cwbRC_CallPgm() and cwbRC_RunCmd() API's. In these cases, you can use this API to retrieve the substitution data for the iSeries server messages contained in the error handle. If there is no substitution data for the message, return code CWBSV_ATTRIBUTE_NOT_SET will be returned. Use the returnLength parameter to determine the actual number of bytes returned in the substitution data when the return code is CWB_OK. The substitution data returned on this API could be used on a subsequent host retrieve message API call (QSYS/QMHRTVM) to retrieve the format of the substitution data or to return secondary help text with the substitution data added in. Host API's are called using the cwbRC_CallPgm() API.