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

What are various search techniques in cobol? Explain.

629


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

1912


What is the difference between comp and comp-3?

685


What is redefines clause in COBOL?

829


can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

1940






I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

10517


What is a SSRANGE and NOSSRANGE?

800


Write a program that uses move corresponding.

658


Which division and paragraphs are mandatory for a COBOL program?

699


how do you reference the rrds file formats from cobol programs

771


For rewrite, why is it mandatory that file needs to be opened?

610


Why did you choose to work with ibm mainframe cobol programming?

617


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...)

1908


HOw can I get the negative sign while deduct high value from low value

1775


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

726