i***@plus-one.com
2006-09-13 05:43:58 UTC
Hi,
I have two questions on COMP-3 data types when found in COBOL
copybooks:
1. Is it safe to say there is no difference between a PIC 99V99 COMP-3
and a PIC 99.99 COMP-3 in a copybook?
The first is an implied decimal point and the second normally tells us
the decimal point can be found in the data. But for PIC 99.99 COMP-3,
should I expect a decimal point to be found in the actual data? Based
on the documentation I've found so far, I can't seem to get a clear
answer on this one. If a decimal is expected in the actual data, this
would seem to contradict why someone would use COMP-3's in the first
place.
2. All COMP-3 data use the last nybble to store the sign for the
number (i.e., C=positive, D=negative, F=unsigned in the actual data).
Does the COBOL copybook need to have an S (like PIC S99 COMP-3) in
order to see a C or D at the end of the data? Based on what I've
read, the answer seems to be no.
I'm finalizing support for COMP-3 conversion for our +1Copybook
product, in this case, to read in COMP-3 data into the SQL Server
database using BULK INSERT.
Thanks in advance for any help!
John D.
+1 Software Engineering
I have two questions on COMP-3 data types when found in COBOL
copybooks:
1. Is it safe to say there is no difference between a PIC 99V99 COMP-3
and a PIC 99.99 COMP-3 in a copybook?
The first is an implied decimal point and the second normally tells us
the decimal point can be found in the data. But for PIC 99.99 COMP-3,
should I expect a decimal point to be found in the actual data? Based
on the documentation I've found so far, I can't seem to get a clear
answer on this one. If a decimal is expected in the actual data, this
would seem to contradict why someone would use COMP-3's in the first
place.
2. All COMP-3 data use the last nybble to store the sign for the
number (i.e., C=positive, D=negative, F=unsigned in the actual data).
Does the COBOL copybook need to have an S (like PIC S99 COMP-3) in
order to see a C or D at the end of the data? Based on what I've
read, the answer seems to be no.
I'm finalizing support for COMP-3 conversion for our +1Copybook
product, in this case, to read in COMP-3 data into the SQL Server
database using BULK INSERT.
Thanks in advance for any help!
John D.
+1 Software Engineering