denbcd
Decimal Encode BCD
Encodes a DFP number into BCD format.
Details
The denbcd instruction encodes a Binary-Coded Decimal (BCD) value into a Data-Packed Decimal (DPD) format. It takes two operands, FRT and FRB, where FRT is the target register to store the result and FRB contains the BCD value to be encoded.
Pseudocode Operation
FRT ← EncodeBCDtoDPD(FRB)
Programming Note
The denbcd instruction is used to convert a Binary-Coded Decimal (BCD) value into Data-Packed Decimal (DPD) format. Ensure that the input BCD value in FRB is correctly formatted and aligned as required by the instruction. This operation does not raise exceptions for valid inputs but may require careful handling of special cases like overflow or invalid data.
Example
Encoding
Operands
-
FRT
Target -
FRB
Source -
S
Sign Control