- Primary
allocation = 1 track
- Secondary
allocation = 1 track
- Maximum
number of extents allowed for a sequential dataset on a volume = 16 (1
primary extent + 15 secondary extents)
- 1
primary track
- 15
secondary tracks
Mainframe tips
As a result:
|
Value |
Internal Hex Representation |
|
Unsigned 12345 |
X'F1F2F3F4F5' |
|
+12345 |
X'F1F2F3F4A5' X'F1F2F3F4C5' X'F1F2F3F4E5' |
|
-12345 |
X'F1F2F3F4B5' X'F1F2F3F4D5' |
|
Sign |
Zone Nibble |
|
Unsigned |
F |
|
Positive |
A,C,E |
|
Negative |
B,D |
|
Output of the program is given below |
Hex value for the number displayed |
|
12345 POSITIVE |
X'F1F2F3F4F5' |
|
WS-X : 1234F |
X'F1F2F3F4C6' |
|
1234v POSITIVE |
X'F1F2F3F4A5' |
|
WS-X : 1234F |
X'F1F2F3F4C6' |
|
1234E POSITIVE |
X'F1F2F3F4C5' |
|
WS-X : 1234F |
X'F1F2F3F4C6' |
|
1234V POSITIVE |
X'F1F2F3F4E5' |
|
WS-X : 1234F |
X'F1F2F3F4C6' |
|
1234§ NEGATIVE |
X'F1F2F3F4B5' |
|
WS-X : 1234M |
X'F1F2F3F4D4' |
|
1234N NEGATIVE |
X'F1F2F3F4D5' |
|
WS-X : 1234M |
X'F1F2F3F4D4' |
Typical packed decimal declarations in COBOL are shown
below:
01 WS-NUMBER1 PIC 9(5) COMP-3.
-> Unsigned packed decimal
|
Value |
Internal Hex Representation |
|
Unsigned 12345 |
X'12345F' |
|
+12345 |
X'12345A' X'12345C’ X'12345E’ |
|
-12345 |
X'12345B' X'12345D’ |
|
+123456 |
X’0123456C’ |
As discussed earlier, a packed-decimal field must conform to the valid packed-decimal format. If the field contains invalid digits or an invalid sign nibble and an arithmetic operation is attempted on it, the processor detects the invalid data and raises an S0C7 (Data Exception) abend.