View previous topic :: View next topic
|
Author |
Message |
rupali
New User
Joined: 24 Feb 2006 Posts: 3
|
|
|
|
I am desperately looking for solution of following problem.
I have declared variable OUT-STRNG1 as 9(31).I am moving value 0034511705131000(having 16 digits) to it. I am deviding this variable by 97. The expected answer is 355790774546 with remainder 38. But some truncation is happening and wrong results are produced.I have also used compiler option PROCESS ARITH(EXTEND). I am concerned with only remainder as it should be used in further |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Rupali,
Quote: |
I have declared variable OUT-STRNG1 as 9(31). |
Please check almost similar doubt by some one else.... Can you define Numeric field with 31 digits position.
http://ibmmainframes.com/viewtopic.php?p=32636
Regards,
Priyesh. |
|
Back to top |
|
|
sailendranath
New User
Joined: 28 Feb 2006 Posts: 7 Location: bangalore
|
|
|
|
we cant declare numeric variable withmore than 18 bytes long.l |
|
Back to top |
|
|
rupali
New User
Joined: 24 Feb 2006 Posts: 3
|
|
|
|
Hi Guys,
Problem is solved pretty well using compiler option PROCESS EXTEND(ARITH) AND using variable wich is right justified. Thanks for the help.
Rupali. |
|
Back to top |
|
|
amolsun
New User
Joined: 06 Aug 2005 Posts: 4 Location: pune
|
|
|
|
i guess variable cant be declare with 31.
its upto 18 no. only possible
kindly correct me if wrong |
|
Back to top |
|
|
rupali
New User
Joined: 24 Feb 2006 Posts: 3
|
|
|
|
amo,
l i have declared it as 9(31) with the compiler option PROCESS ARITH(EXTEND) in my COBOL program and its working fine. so i think after using this option ,max numeric size we can use is 31. |
|
Back to top |
|
|
|