Translates data from EBCDIC zoned decimal format to ASCII zoned decimal format. This function can be used for translating data from the iSeries™ server for use in ASCII files.
None.
unsigned int CWB_ENTRY cwbDT_ZonedToASCIIZoned( char *target, char *source, unsigned long length);
The following list shows common return values.
The caller must make sure that there is adequate space to hold the target information. The left half-byte (0xf) in the EBCDIC zoned decimal data will be converted to 0x3 in the left half-byte of the ASCII zoned decimal data except for the last byte (sign). The high half of the last byte of the EBCDIC zoned decimal data indicates the sign of the number. If the high half-byte is 0xb or 0xb then a negative number is indicated, any other value indicates a positive number. This function checks that the high half of each byte of EBCDIC zoned decimal data must be 0xf except for the last byte. The low half of each byte of EBCDIC zoned decimal data must be in the range 0-9.