Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

1390


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

2297


What are all the divisions of a COBOL program?

1267


Explain how to differentiate call by context by comparing it to other calls?

1239


What the difference is between continue and next sentence?

1215


i need a small 3d program using inline and outline.

2251


Can you please let me know the centre name of INS certification in Kolkata.

2283


What is amode(24)?

1293


What is Pic 9v99 Indicates in COBOL?

1336


Name the divisions, which are available in a cobol program?

1292


What is the Purpose of POINTER Phrase in STRING command in COBOL?

1297


) How do u handle errors in BMS macro?

2010


Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

2472


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

3317


What is the usage of comp fields in cobol?

1222