NetBase SQL Shadowing Handbook

NetBase SQL User Exits
____________________________________________________________
ver A0195 QUEST Software, Inc. 3-25
DataStart = DataEnd - precision + 1;
SignPos = DataEnd + 1;
memset (result, 0, 80);
if ((DecimalPlace = precision - scale) == 0)
outStr[PutPos++] = '.';
for (i = DataStart; i <= DataEnd; i++) {
outStr[PutPos] = ASCIIZero + btod(data,i);
if (PutPos == DecimalPlace-1)
outStr[++PutPos] = '.';
PutPos++;
}
for (;*outStr && *outStr == '0'; outStr++);
if (*outStr == 0)
*outStr = '0';
else {
if (*outStr == '.')
*(--outStr) = '0';
if (btod(data,SignPos) == MinusSign)
*(--outStr) = '-';
}
return outStr;
} /* end uexit_BCD_convert */
/* uexit_print_data */
/* */
/* Format and then print the data. The type of data and its */
/* length are passed in. */
/* */
void uexit_print_data (char *data, char *cname, short ctype,
int clen, int precision, int scale)
{
char msg[90];
short sdata;
int idata;
struct {
unsigned year :14;
unsigned month :4;
unsigned day :6;
} dt;
struct {
unsigned hour :6;
unsigned minute :6;
unsigned second :6;
} tm;
struct {
unsigned fill :2;
unsigned milli :20;