Translates ASCII numeric data to packed decimal format. This function can be used for translating ASCII text data for use on the iSeries™ server.
cwbDT_WideToPacked
unsigned int CWB_ENTRY cwbDT_ASCIIToPacked(
char *target,
char *source,
unsigned long length,
unsigned long decimalPosition);
The following list shows common return values.
The caller must make sure that there is adequate space to hold the target information. The sign half-byte will be set to 0xd to indicate a negative number and hex 0xc to indicate a positive number. 0 <= decimalPosition < (length * 2). Valid formats for the ASCII numeric data are as follows:
" + 123\0" "- 123 \0" " +123 \0" " 123\0" " -12.3\0" "+1.23 \0"