Page 1 of 1

How to change edited num to comp num

PostPosted: Thu Oct 11, 2007 12:39 pm
by karthick
hi, pls help me in solving the issue,

Im reading a file which contain values in this format 0f -100,00,000. i have to use this value for computation.
How can i change this value in a computable form.

Re: Reg

PostPosted: Thu Oct 11, 2007 2:06 pm
by CICS Guy
The easiest would be the intrinsic function NUMVAL....

Re: How to change edited num to comp num

PostPosted: Thu Oct 11, 2007 9:46 pm
by karthick
Will the Numval function gives me the value for -1,00,000 as -100000. which can be used for computation?
Still this issue hasnt been solved. Since im a beginner im not much aware of complex fuctions. can any one help me in detail wat to done?

Re: How to change edited num to comp num

PostPosted: Thu Oct 11, 2007 10:31 pm
by CICS Guy
Forgot about the commas......

01 question pic x(10) value '-1,00,000'
01 answer pic s9(9) value zero
01 pretty-answer pic --------9.
Compute answer = NUMVALC (question)
move answer to pretty-answer
display answer
00010000{
display pretty-answer
-100000.

Re: How to change edited num to comp num

PostPosted: Sat Oct 13, 2007 12:25 am
by karthick
Thank u for your suggestion Guys its working...Problem Solved :)

Re: How to change edited num to comp num

PostPosted: Tue Oct 30, 2007 7:57 pm
by abkumarch
i m sorry karthik, bt how do u assume the pic X(10), rather he says that numeric edited item ?
And one more thing, why display answer wil show ' 00010000{ '. if possible ans me ?

I ve also send some interesting questions, nd i need the answers ... can u spare some time 4 me....

Re: How to change edited num to comp num

PostPosted: Wed Oct 31, 2007 2:16 am
by dick scherrer
Hello,

why display answer wil show ' 00010000{ '
This is shown by a display because of the "sign".