Multiple choice technology mainframe

How many bytes will be used to store data internally for a variable defined as PIC S9(8)V99 Comp-3?

  1. 10

  2. 6

  3. 5

  4. 11

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

For Comp-3 (packed decimal) format, the byte calculation is: total digits (8+2=10) plus sign digit. The formula is ceiling((n+1)/2). For 10 digits: ceiling(11/2) = ceiling(5.5) = 6 bytes. In Comp-3, each byte holds 2 digits except the last byte which holds 1 digit plus the sign. Therefore, PIC S9(8)V99 Comp-3 requires 6 bytes of internal storage.