View previous topic :: View next topic
|
Author |
Message |
prem_ibm
New User
Joined: 15 Sep 2007 Posts: 31 Location: Chennai
|
|
|
|
Hi Every one !
Unfortunately i got one requirement where i have to divide one field which is more then 18 in length.
i am thinking to devide data in half part.....later this will be merge...to get data length equal to 18 or less then 18.
expected result should be same(whether will dividing in one short or half..half and merging...for final dividation)
Thanks
Prem |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Does your compiler support the ARITH(EXTEND) option?
What is your Cobol Version/Release?
If it doesn't support ARITH(EXTEND), then this division is easily accomplished via an Assembler sub-program.
Assembler supports up to 16-Bytes/31-Digits, Packed-Decimal (COMP-3) or you can use the Assembler 64-Bit "Grande" Registers or Aligned-Doublewords along with the "Divide Grande" instruction.
Enterprise PL/I can also do this.
Anyway you look at it, it can be done.... |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Surely you are not the first at your site to use a wildly big number? Ask someone who's already done it.
If you are, do as Mr Bill indicates, look at the compile options at the start of your output listing from a compile. Early on, you should/may see ARITH(COMPAT). If so, find out from your support people how to compile with ARITH(EXTEND). |
|
Back to top |
|
|
|