BCD Conversion
The BCD Conversion action converts data from a BCD format into a numeric format. The value that was converted from a BCD format can be stored in either an integer, an unsigned integer, or a floating point numeric format.The action can also convert integer, unsigned integer, or floating point data into a BCD format.
A BCD Conversion can be done on an individual data
element or an array of data elements.
Parameter descriptions
Parameter | Description |
---|---|
Conversion | The type of conversion to be performed, either From BCD or To BCD. The From BCD option will convert BCD data into a numeric format, while the To BCD option will convert numeric data into a BCD format. |
Input Data Type | The data type of the input data.
This is the format of the variables that contain the BCD values, if the From BCD conversion option is selected. The following options are available if the Conversion parameter is From BCD.
This is the format of the variables that contain the numeric values, if theTo BCDconversion option is selected. The following options are available if the Conversion parameter isTo BCD.
|
Output Data Type |
The data type of the output data. This is the format of the variables that contain the numeric values, if the From BCD conversion option is selected. The following options are available if the Conversion parameter is From BCD.
This is the format of the variables that contain the BCD values, if the To BCD conversion option is selected. The following options are available if the Conversion parameter is To BCD.
|
Decimal Point |
This option will indicate how the
conversion will handle the decimal
points when either the FLOAT4 or FLOAT8
data types are selected.
FLOAT8 data types will contain the following options:
If the Conversion parameter is From BCD, the Decimal Point parameter dictates how many decimal places the value should be shifted to the right after it has been converted from its BCD format. For example if a value of 1234 is returned from the From BCD process and the Decimal Point parameter is 3, the value of 1.234 will be written to the FLOAT4 or FLOAT8 variable. If the Conversion parameter is To BCD, the Decimal Point parameter dictates how many decimal places the value should be shifted to the left before it is converted to a BCD format. For example if a FLOAT4 variable has a value of 13.64316 and the Decimal Point parameter is 2, the value of 1364 will be converted into a BCD value. |
Number of Elements | This is the number of elements that will be processed during the conversion. A value of 1 indicates the conversion should process one value. A value greater than 1 indicates that an array of values will be converted when the action is executed. |
Input tab
Parameter | Description |
---|---|
Input Value | The element that contains the data
that will be the source of the BCD
conversion.
The value in the Logical column is set based on the value selected in the Input Data Type parameter. The value in the Count column is set based on the value entered in the Number of Elements parameter. |
Output tab
Parameter | Description |
---|---|
Output Value | The destination variable where the
converted data is copied.
The value in the Logical column is set based on the value selected in the Output Data Type parameter. The value in the Count column is set based on the value entered in the Number of Elements parameter. |
resultStatus |
A numeric value that will be 0
(zero), if the conversion was
successful. A value less than 0 will
indicate that an error occurred during
the conversion.
|
Element in Error | This will indicate the first array element that contained a value that could not be converted because it was not in a valid BCD format, or contained a value that could not be converted into a valid BCD format. |