View previous topic :: View next topic
|
Author |
Message |
ponnu116 Warnings : 1 New User
Joined: 12 Sep 2007 Posts: 21 Location: chennai
|
|
|
|
Can we convert sign of a numeric edited variable in cobol using a simple way.
Ex : if a data field whose declaration is -------------9.999 and value is -456.347 how can i convert this value to 456.347 in a simple way preferably using a command. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
numeric-signed-variable * -1 = numeric-signed-variable with opposite sign. |
|
Back to top |
|
|
rag swain
New User
Joined: 17 Dec 2007 Posts: 33 Location: pune,INDIA
|
|
|
|
Go for a sign test in an IF statement and if it is negative MULTIPLY -1 TO that variable to get your desired ouput. |
|
Back to top |
|
|
|