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
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
How can you get the ksds file records into your cobol program?
What are different data types in cobol?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
What is the Purpose of Pointer in the string?
When is inspect verb is used in cobol?
How arrays can be defined in COBOL?
Can we redefine the field of x(200) to less than 200?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
What are the different rules of SORT operation?
what is difference between cobol and cobol/400
how do you define single dimensional array and multidimensional array in your cobol?
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 amode(24)?