Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Handling more than 18 digits in cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
mosinjamadar

New User


Joined: 26 Sep 2007
Posts: 42
Location: pune

PostPosted: Thu Jul 03, 2008 8:32 pm    Post subject: Handling more than 18 digits in cobol
Reply with quote

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
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Thu Jul 03, 2008 8:49 pm    Post subject: Re: Handling more than 18 digits in cobol
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8189
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jul 03, 2008 11:18 pm    Post subject:
Reply with quote

Also, note that COMP fields cannot exceed 18 digits, period.
Back to top
View user's profile Send private message
Itanium

Active User


Joined: 22 Jan 2006
Posts: 114
Location: India

PostPosted: Fri Jul 04, 2008 2:52 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jul 04, 2008 11:59 pm    Post subject:
Reply with quote

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
View user's profile Send private message
mosinjamadar

New User


Joined: 26 Sep 2007
Posts: 42
Location: pune

PostPosted: Sat Jul 05, 2008 4:11 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10360
Location: italy

PostPosted: Sat Jul 05, 2008 4:28 pm    Post subject: Reply to: Handling more than 18 digits in cobol
Reply with quote

strange that You did not find anything icon_surprised.gif

Code:
PROCESS ARITH(EXTEND)                                 
IDENTIFICATION DIVISION.                               
..........
............
Back to top
View user's profile Send private message
mosinjamadar

New User


Joined: 26 Sep 2007
Posts: 42
Location: pune

PostPosted: Sun Jul 06, 2008 5:54 pm    Post subject:
Reply with quote

Thanks a lot
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us