| IBM MAINFRAME HELP & SUPPORT FORUMS Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
mosinjamadar
Joined: 26 Sep 2007
Posts: 10
Location: pune
|
| Posted: Thu Jul 03, 2008 8:32 pm Post subject: Handling more than 18 digits in cobol |
|
|
Hi All,
I want to handle more than 18 digits in my program because i m getting more than 14 digits when there are 3 decimal places
Please help me out if u know |
|
| Back to top |
|
Bill O'Boyle
Joined: 14 Jan 2008
Posts: 345
Location: Orlando, FL, USA
|
| Posted: Thu Jul 03, 2008 8:49 pm Post subject: Re: Handling more than 18 digits in cobol |
|
|
This was added to OS/390 COBOL 2.2 (circa late 1990's) and is included as an option in all subsequent releases of COBOL. It can be activated by specifying the compiler option ARITH(EXTEND).
Note that ARITH(EXTEND) is NOT the default and it must be expressly specified.
However, please be advised that this option could (at times) requires that COBOL access a run-time routine for certain calculations, which may or may not cause increased response-time.
I would consult your System Programmer and/or Tech Support person, who could then let you know the pros and cons of this option.
Regards,
Bill |
|
| Back to top |
|
Robert Sample
Joined: 06 Jun 2008
Posts: 943
Location: Atlanta, GA
|
| Posted: Thu Jul 03, 2008 11:18 pm Post subject: |
|
|
| Also, note that COMP fields cannot exceed 18 digits, period. |
|
| Back to top |
|
Itanium
Joined: 22 Jan 2006
Posts: 57
Location: India
|
| Posted: Fri Jul 04, 2008 2:52 pm Post subject: |
|
|
I'n not sure if this makes sense, try to have two variables.
First one before the decimals.
Second one holding the decimal values. |
|
| Back to top |
|
dick scherrer
Joined: 23 Nov 2006
Posts: 8732
Location: 221 B Baker St
|
| Posted: Fri Jul 04, 2008 11:59 pm Post subject: |
|
|
Hello,
Quote: I'n not sure if this makes sense, try to have two variables. Only if the numbers are never used "as one". This means it could never be used in a forumla or accounting which would almost surely eliminate this approach. |
|
| Back to top |
|
mosinjamadar
Joined: 26 Sep 2007
Posts: 10
Location: pune
|
| Posted: Sat Jul 05, 2008 4:11 pm Post subject: |
|
|
| Could you please give me the sytntax for ARITH(EXTEND) how to use it in cobol ,I tried lot of manual but i was unable to founf it |
|
| Back to top |
|
enrico-sorichetti
Joined: 14 Mar 2007
Posts: 3168
Location: italy
|
| Posted: Sat Jul 05, 2008 4:28 pm Post subject: Reply to: Handling more than 18 digits in cobol |
|
|
strange that You did not find anything :eek:
Code: PROCESS ARITH(EXTEND)
IDENTIFICATION DIVISION.
..........
............
|
|
| Back to top |
|
mosinjamadar
Joined: 26 Sep 2007
Posts: 10
Location: pune
|
| Posted: Sun Jul 06, 2008 5:54 pm Post subject: |
|
|
| Thanks a lot |
|
| Back to top |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|