IBM Natural Question:
Download Questions PDF

A field declared as P8 needs to be redefined as
Alphanumeric. What would be its new size?

Answers:

Answer #1
I think directly this conversion is not possible as packed
decimal is used for numeric value fields only.
Since it is p(8) so the numeric value field size should be
15 or 16 as [8 can be either (n+1)/2 i.e. (15+1)/2 or ( n/2)
i.e. 16/2].
So we can say (n15 or 16) will be (P8).
Alternatively (A16 or 15)

Answer #2
Yes, It can be redefined and its size would be 5 (A5). A P8 variable contains 8 BCD (Binary Coded Decimal) digits. If the size is even the size is (8/2) + 1 but if is odd (say 7) divide by (7/2) =3.5 and round to the next integer: 4.

Download IBM Natural Interview Questions And Answers PDF

Previous QuestionNext Question
Is it possible to declare a GDA for an external subroutine?How to create 1 DDM that fetches 3 ADABAS files simultaneously?