Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

PL/I & Assembler :: RE: Incorrect output when trying to add numbers

$
0
0
Author: steve-myers
Subject: Reply to: Incorrect output when trying to add numbers
Posted: Fri Jan 13, 2017 5:48 pm (GMT 5.5)

  • Post this query in the Help & Support Forum for Mainframe Beginners. This forum is supposed to be for more advanced users.
  • When you post code, like your little program, surround it by phpBB code tags. You can find out about these tags by using Google.
  • Carefully read and understand the discussion about the zoned decimal, packed decimal, and decimal codes, and the UNPK instruction in Principles of Operation. Zoned decimal does not necessarily mean 100% readable, though 100% readable is usually acceptable to the PACK instruction and subsequent decimal arithmetic instructions. The last paragraph in the decimal codes topic will explain why.
  • One additional instruction is typically used after the UNPK instruction to update the zoned decimal sign to make the zoned decimal number 100% readable. You can also used the same instruction, though with different data, to update the sign in the packed decimal data before you use the UNPK instruction. At various times in my career I've used both solutions. Hint: this instruction is not a "decimal" instruction.


Viewing all articles
Browse latest Browse all 8500

Trending Articles