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 / dimpy19
try with this:
01 VARIABLE-ABC.
03 VAR-1 PIC 9(18).
03 VAR-2 PIC 9(2).
or
use PROCESS ARITH(EXTEND) before IDENTIFICATION DIVISION
ARITH option syntax
.-COMPAT-.
>>-ARITH(-+-EXTEND-+-)-----------------------------------------><
When you specify ARITH(EXTEND):
The maximum number of digit positions that you can specify in the PICTURE clause for packed-decimal, external-decimal, and numeric-edited data items is raised from 18 to 31.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
What is perform what is varying?
What is rmode(any) ?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
What is a SSRANGE and NOSSRANGE?
What is amode(31)
Name some of the examples of COBOl 11?
how do you reference the rrds file formats from cobol programs
Are you comfortable in cobol or jcl?
What is a report item?
How do you reference the following file formats from cobol programs?
What are different data types in cobol?