Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
rupali

New User

Joined: 24 Feb 2006
Posts: 3

 Posted: Fri Feb 24, 2006 2:22 pm    Post subject: Problem while dividing the numeric value 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

priyesh.agrawal

Senior Member

Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

Posted: Fri Feb 24, 2006 8:27 pm    Post subject: Re: Problem while dividing the numeric value

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.
sailendranath

New User

Joined: 28 Feb 2006
Posts: 7
Location: bangalore

 Posted: Tue Feb 28, 2006 2:25 pm    Post subject: Re: Problem while dividing the numeric value we cant declare numeric variable withmore than 18 bytes long.l
rupali

New User

Joined: 24 Feb 2006
Posts: 3

 Posted: Wed Mar 01, 2006 10:34 am    Post subject: Re: Problem while dividing the numeric value 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.
amolsun

New User

Joined: 06 Aug 2005
Posts: 4
Location: pune

 Posted: Wed Mar 01, 2006 3:55 pm    Post subject: i guess variable cant be declare with 31. its upto 18 no. only possible kindly correct me if wrong
rupali

New User

Joined: 24 Feb 2006
Posts: 3

 Posted: Thu Mar 02, 2006 11:04 am    Post subject: I have declared variable OUT-STRNG1 as 9(31). 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.
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Sort numeric fields with trailing spaces sancraig16 SYNCSORT 7 Tue Apr 03, 2018 1:21 am Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm Having a problem FTP'ng to the MF pahiker All Other Mainframe Topics 2 Fri Nov 10, 2017 8:20 pm File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us