Page 1 of 1

maximum length of numeric in cobol

PostPosted: Tue Sep 11, 2012 8:26 am
by seiko
What is the maximum lenght of numeric field that is allowed in COBOL?
What is the picture clause of a 15 digits numeric value having decimal for with commas? without commas?
Is comma included in the account for this S9(4)V99?

Re: maximum length of numeric in cobol

PostPosted: Tue Sep 11, 2012 8:38 am
by BillyBoyo
The maximum number of digits in a numeric field depends on compiler option ARITH.

In a numeric-edited field, only the digits (the numbers) count towards the maximum.

PIC S9(4)V99 has no comma and no decimal-point.

Now, you need to do a little reading in the Cobol manuals.

You need to understand the difference between numeric and numeric-edited.

You need to be able to find answers to questions like your subject in the manuals.

If there is something you are unclear about, post what you have understood, and your question relating to that. Someone will be here.

Re: maximum length of numeric in cobol

PostPosted: Tue Sep 11, 2012 4:11 pm
by Anuj Dhawan
...and V is Implied Decimal point in the definition you show.

A rather straight question, I'd like to ask is - why do you worry about the limit (length?) of numeric field? What are you trying to accomplish? If you tell us that, possibly someone will be able to address your question better.