Precision |
COBOL equivalent |
Field length |
---|---|---|
Single |
COMP-1 |
4 bytes |
Double |
COMP-2 |
8 bytes |
Example
This example shows the CA Culprit parameters required to convert single- and double-precision values to packed decimal format.
The following code:
INPUT 80 F 2960 REC FIELD1 1 4 REC FIELD2 5 8 990 PACKED-SINGLE DP=2 990 PACKED-DOUBLE DP=3 990 CODE-1 '1234' 990 CODE-2 ' ' . . . 997010 CALL US36 (FIELD1 'S' PACKED-SINGLE 2 CODE-1) 997015 CODE-1 NE ' ' 200 997020 CALL US36 (FIELD2 'D' PACKED-DOUBLE 3 CODE-2) 997025 CODE-2 NE ' ' 200 997100 TAKE 997200 $ERROR HANDLING ROUTINE IS CODED HERE
Copyright © 2014 CA.
All rights reserved.
|
|