Procedure Modules › Converting Floating Point Values to Packed Decimal(CULLUS36) › How to Use CULLUS36
How to Use CULLUS36
To invoke CULLUS36:
First—Define the input file and the field containing the floating point values.
Second—Define work fields to receive the converted value (16-byte numeric field) and hold the precision indicator (1-byte alphanumeric field) if an alphanumeric literal is not used.
Third—Issue a CALL to CULLUS36 in type 7 logic:
Col
2
▼
RPT-nn7sss CALL US36 (field-name indicator-qv result-v
decimal-place-vn end-code-v)
- Rpt-nn, coded in columns 2 and 3, specifies a 2-digit number in the range 00 through 99 that identifies the CA Culprit report.
- Sss, coded in columns 5 through 7, specifies a 3-digit number indicating the sequence number of the type 7 parameter.
- Field-name (ARG1) requires the name of the input field that contains the single or double precision floating point value.
- Indicator-qv (ARG2) is a 1-byte literal, enclosed in single quotation marks, or the name of an alphanumeric work field that contains the precision indicator:
Precision...
|
Is indicated by...
|
Single
|
'S'
|
Double
|
'D'
|
- Result-v (ARG3) requires the name of a 16-byte packed decimal work field to receive the converted value.
- Decimal-place-vn (ARG4) requires an integer or the name of an 8-byte packed decimal work field that specifies the number of decimal places returned in the output. The range is 0 through 14.
- End-code-v (ARG5) requires the name of a 4-byte alphanumeric work field whose value specifies whether the conversion is successful:
The value...
|
Indicates the conversion is...
|
Blank
|
Successful
|
ARGn
|
Unsuccessful in the argument indicated
|
Fourth—Test the value of the error indicator work field (end-code-v) immediately after the US36 call.
Copyright © 2014 CA.
All rights reserved.
|
|