manishkaduskar
Programmer
I converted the comp-3 format data to hex and then displayed it by removing the C(for +ve ) and D(for -ve). But I am unable to find the position of the decimal point in the variable.
Eg:
The data format :
SALARY PIC S9(4)V9(2) USAGE COMP-3 value 12.34
will have 01234C But the position of Decimail point is not there.
I want to generalise it for any decimal place.
Also, How do I know the data type of a variable which may be in binary, comp, comp3 , char, varchar etc any DB2 format.
I am writing a program in REXX that reads a flat file that has DB2 data, converts the data to some other form(char and integers and floats) which may be easily deciphered and writing the converted data to another flat file.
Thanks a lot ,
Manish.
Eg:
The data format :
SALARY PIC S9(4)V9(2) USAGE COMP-3 value 12.34
will have 01234C But the position of Decimail point is not there.
I want to generalise it for any decimal place.
Also, How do I know the data type of a variable which may be in binary, comp, comp3 , char, varchar etc any DB2 format.
I am writing a program in REXX that reads a flat file that has DB2 data, converts the data to some other form(char and integers and floats) which may be easily deciphered and writing the converted data to another flat file.
Thanks a lot ,
Manish.