Numeric Conversion; Mto (Mainframe To Open System) Numeric Value Conversion Overview; Packed Decimal Conversion (Num:opa1); Sign - HP StorageWorks P9000 User Manual

Data exchange code converter user guide
Hide thumbs Also See for StorageWorks P9000:
Table of Contents

Advertisement

7 Numeric Conversion

This chapter describes the considerations involved in performing numeric value conversions.
• MTO (Mainframe To Open System) Numeric Value Conversion
• Packed Decimal Conversion
• Zoned Decimal Conversion
MTO (Mainframe To Open System) Numeric Value Conversion
Overview
Numeric values are stored in Mainframe systems as packed decimal or zoned decimal. The Data
Exchange Code Converter provides the following types of numeric value conversion for each field
data type, as shown in the following table.
Table 15 Types of Numeric Value Conversion
Input Field Data Type
Packed decimal
Zoned decimal
Numeric value conversion output is right-aligned. If an output field is not large enough for the converted
value (the effective length of the converted field is longer than the output field length), an error is
generated (error code: 757).
Conversely, if there is extra space in the output field (the effective length of the converted value is
shorter than the output field length), the extra space preceding the effective field data is padded with
0 or a blank space(s).

Packed Decimal Conversion (NUM:OPA1)

Packed decimal conversion divides 1 byte of numeric (packed decimal) data in the specified field
into the top 4 bits and the bottom 4 bits, and then converts each group into 1 byte of character data,
resulting in a total of 2 bytes of character data. If the 1 byte of packed decimal data is out of range
(top/bottom 4 bits: X'A' to X'F'), an incorrect data error is generated (error code: 760). Packed
decimal conversion is performed according to the options specified in the Edit Option file.

Sign

The bottom 4 bits in the last byte of packed decimal data contain the sign bits. Sign bits are recognized
as follows:
(NUM:OPA1), page 63
(NUM:OPA2), page 65
Numeric Value Conversion
Packed decimal data converted
to character data
Zoned decimal data converted to
character data
P9000 Data Exchange Code Converter User Guide
Overview, page 63
Field Type and Conversion
Mode
NUM:OPA1
NUM:OPA2
63

Advertisement

Table of Contents
loading

Table of Contents