prashanthreddy wrote:Hi All,
I would like to know how to calculate the Pic size of a COMP-3 and COMP variables.
My requirement is in my COBOL program one variable is declared as S9(9)V99 COMP-3.Now i would like to declare an equivalent alpha numeric for the COMP-3 variable. wat is the Pic size of alpha numeric ( X(??)) variable.
How to calculate the size of equivalent alpha numeric for COMP-3 and also COMP ??
Thanks in advance.
None of the mentioned answers are correct.
The question is declare an equivalent PIC X variable that should be 9 + 2 = PIC X (11).
The calculation which is being done in the other replies is about the bytes compiler takes to store the comp-3 variable internally to save memory.
Seniors correct me if I am wrong