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.
How to change edited num to comp num
-
- Posts: 6
- Joined: Thu Oct 11, 2007 12:16 pm
- Skillset: Cobol JCL DB2 IMSDB
- Referer: Google search
Re: How to change edited num to comp num
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?
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
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.
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.
-
- Posts: 6
- Joined: Thu Oct 11, 2007 12:16 pm
- Skillset: Cobol JCL DB2 IMSDB
- Referer: Google search
Re: How to change edited num to comp num
Thank u for your suggestion Guys its working...Problem Solved 

Re: How to change edited num to comp num
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....
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....
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: How to change edited num to comp num
Hello,
This is shown by a display because of the "sign".why display answer wil show ' 00010000{ '
Hope this helps,
d.sch.
d.sch.