IBM Assembler Question:
Download Questions PDF

What is the difference in data type "X" and "P"?

Answer:

In MVS assembler data type X denotes hexadecimal data type
which unsigned pack. suppose you define VAR1 as "VAR1 DC
X'01'". It will occupy 1 byte in the memory and stored as:
0 in the zoned nibble and 1 in the numeric nibble.

P denotes the packed data type, similar to COMP-3 in COBOL.
if you declare any variable with this data type then it
must have a sign byte at last nibble. See following example:
VAR2 DC P'1'
it will occupy one byte in the memory and stored as '1C'.

Download IBM Assembler Interview Questions And Answers PDF

Previous QuestionNext Question
Why do we have multiple base registers in certain programs?Why do we use "drop"? What does "using" do?