View previous topic :: View next topic
|
Author |
Message |
bidhanlaha
New User
Joined: 07 Mar 2005 Posts: 2 Location: India, Kolkata
|
|
|
|
hi,
I'm getting a file which has the transaction amount in the following format
$-123.50. for that file to read i have a copy book for the transaction amount WS-TRAN-AMNT PIC $9(11)V99.
While reading the value am getting is 000000000
Can anyone please tell me how can i get rid of the problem. |
|
Back to top |
|
|
Niteshs
New User
Joined: 24 Mar 2005 Posts: 6
|
|
|
|
the display you have provided is of 9 digits 000000000 but it is defined as $9(11)V99.
can you provide the full figure here. |
|
Back to top |
|
|
bidhanlaha
New User
Joined: 07 Mar 2005 Posts: 2 Location: India, Kolkata
|
|
|
|
yes niteshs u r right, the display is also 13 digit
my actual problem is how can i read a value from a file having values like $-123.50 |
|
Back to top |
|
|
Niteshs
New User
Joined: 24 Mar 2005 Posts: 6
|
|
|
|
Move this to S9(11)V9 and see the results and let us know also |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi bidhanlaha,
You're probably long gone now, but a few words to you anyway. This may help others who post ques here.
I find it strange that we lost contact w/you when Niteshs asked you to try someting and let us know how it worked out.
In order to help we need a well defined unambiguous defintion of the problem. For example, you state the field length is 13 bytes, yet you show $-123.50 (7 bytes), as an example of the field contents. Does the field have leading spaces, trailing spaces? Or is it truly 7 bytes? If so, what are the lengths of the field in the other recs in the file? Could we be dealing w/a variable len file?
You also show the copybook field's PIC as $9(11)V99. Generally PICs w/a $ use a period (.) not a V for the decimal point. I ask myself if this is not another error. Who knows? The data provided should be exact copies of the data in question, using cut & paste, not re-typing that can be error prone and carry the prejudices of the author.
The pgming business is a detail oriented pursuit. If you're not willing to operate day to day at this level of detail I'm afraid you won't advance too far in the profession you've chosen.
So, in closing Bidhanlaha, the quality of the help you receive is in direct proportion to the quality of your input. |
|
Back to top |
|
|
anuradha
Active User
Joined: 06 Jan 2004 Posts: 247 Location: Hyderabad
|
|
|
|
Well said Jack! |
|
Back to top |
|
|
|