How to define variable 9(20) in COBOL, because compiler
does not allow us to declare variables with Pic 9(18). Can
anyone please let me know the answer... I know one answer
to this question which is to use Compiler option Arith
(Extend) during Compilation. It extends the maximum limit
to 9(32)..Just wanted to know if there is any other way to
extend this?

Answer Posted / abc

try with this:

01 VARIABLE-ABC.
03 VAR-1 PIC 9(18).
03 VAR-2 PIC 9(2).

This may work, please try and see.

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If you are current on the owner of a set, what is the difference between obtain next and obtain first?

644


How do you differentiate between cobol and cobol-ii?

658


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

1933


What is the difference between PIC 9.99 and PIC9v99?

781


What kind of error is trapped by on size error option?

740






How can we find that module can be called – whether DYNAMICALLY or STATICALLY?

712


What rules are followed by the search verb.

638


How many bytes S(8) comp field occupy and its maximum value?

1634


When is inspect verb is used in cobol?

677


how to access the file from prodution from changeman tool and to submit a file to production

6686


Can a Search can be done on a table with or without Index?

804


What is amode(31)

724


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

676


Which mode is used to operate the sequential file?

669


What is the local-storage section?

683