Answers

Question and Answer:

  Home  IBM Assembler

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

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'.

 126 views

More Questions for you: