View previous topic :: View next topic
|
Author |
Message |
Shriram Jogdand
New User
Joined: 14 Oct 2008 Posts: 65 Location: Pune
|
|
|
|
Hi,
PIC S9(9)V99 COMP.
Is this declaration valid? If yes then how much bytes will it take?
Thanks. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
With interview questions, you tell us what you answered and we comment upon the correctness of your answer. |
|
Back to top |
|
|
Shriram Jogdand
New User
Joined: 14 Oct 2008 Posts: 65 Location: Pune
|
|
|
|
I told that we cant declare the decimal format with COMP. Either we can simply use PIC S(9)V99 or PIC S9(9)V99 COMP-3. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Actually, from section 5.3.17.1 of the COBOL Language Reference manual:
Quote: |
The PICTURE of a computational item can contain only:
9
One or more numeric character positions
S
One operational sign
V
One implied decimal point
P
One or more decimal scaling positions |
and S999V99 COMP is perfectly valid in Enterprise COBOL. |
|
Back to top |
|
|
|