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

Answers were Sorted based on User's Feedback



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

Answer / shailesh jha

Its new size would be A5. P8 Stores in compressed format
having (n/2+1) bytes.

Is This Answer Correct ?    15 Yes 2 No

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

Answer / madirtere

The redefined size is A5.

Is This Answer Correct ?    13 Yes 2 No

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

Answer / ajmina gilani

New size should be A5, as P8 will take 5 byte to store. But
when I have tested with redefining P8 by A5, it is not
displaying proper value for redefind veriable.

Is This Answer Correct ?    6 Yes 2 No

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

Answer / getme

5 bytes, see below
NAT0039 Sum of field lengths in REDEFINE > length of base field (=5 bytes).
0010 DEFINE DATA LOCAL
0020 01 #P (P8)
0030 01 REDEFINE #P
E 0040 02 #A (A8)
0050 END-DEFINE

Is This Answer Correct ?    0 Yes 0 No

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

Answer / surya

It should be redefined as A8.

Reason: even though the P8 occupies 5 bytes of memory
it is internal to the memory allocation. But to accomaodate
8 characters you need todeclare a alphanumeric character of
length 8.

dont be confused with memory allocation awith the
declaration.

Is This Answer Correct ?    5 Yes 6 No

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

Answer / mg

The new size will be A8

Is This Answer Correct ?    2 Yes 8 No

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

Answer / praby

should be defined as A8 and it wil take 8 bytes

Is This Answer Correct ?    1 Yes 8 No

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

Answer / dd

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)

Is This Answer Correct ?    6 Yes 14 No

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

Answer / harish

Should be less than or equal to 8, but not more than 8.

Is This Answer Correct ?    1 Yes 14 No

Post New Answer

More Natural Interview Questions

How to receive data passed through jcl parm parameter in a natural program?

0 Answers  


What is the difference between read(1) and read work file once?

0 Answers  


Explain how to ftp the natural program to desktop? (From mainframe to pc), is it possible?

0 Answers  


how to move cursor to a particular field when position is not known?

3 Answers  


What is STACK in Natural? How we can use it in Program? Give me Eg.?

2 Answers   IBM,






how to ftp the natural program to desktop? (from mainframe to pc), is it possible?

2 Answers  


You are processing an input file in a Natural program and you want the program to fail if the file is empty. What command you use in Natural to force it to fail ?

6 Answers   IBM, TCS,


What is a hyperdescriptor?

0 Answers  


How can we see the copy book length using file-aid?

0 Answers  


What is a hyperdescriptor? How does it work?

0 Answers  


Explain what happens when you issue a escape routine in a program? Will there be any compilation /run time erro?

0 Answers  


Explain difference between read(1) and read work file once?

0 Answers  


Categories