I'm reading this file where the data is written to the file in
edited numeric fields like:
01 Data.
03 Data_a pic -9(13)V(2).
03 Data_b pic -9(13)V(2).
03 Data_c pic -9(13)V(2).
03 Data_d pic -9(13)V(2).
so when the value -2542,23 is stored in
Data_a it looks in the file like this:
-000000254223
My intention is to read the data to a similar edited fields like:
01 Datax.
03 Datax_a pic -9(13)V(2).
03 Datax_b pic -9(13)V(2).
03 Datax_c pic -9(13)V(2).
03 Datax_d pic -9(13)V(2).
Then I try to move for example the Datax_a-field
to this edited field:
01 Edited_b pic -B---B---B---B--9,99
so that when we print the value it should look like this
-2 542,23
And this is were it all goes wrong. When I move the edited
Datax_a -field to Edited_b it looks like:
-25,42
So where did my decimal part go? It looks like that only
the integer part has been move to Edited_b and it's in the wrong
place.
I've also tried to move the Datax_a first to pic s9(13)V(2) and then
to Edited_b with no luck. I've also tried to make Edited_b bigger and smaller,
added and removed those minus signs and B's, but nothing really helps.
Sorry for my bad English,
thanks in advance
Sakke
edited numeric fields like:
01 Data.
03 Data_a pic -9(13)V(2).
03 Data_b pic -9(13)V(2).
03 Data_c pic -9(13)V(2).
03 Data_d pic -9(13)V(2).
so when the value -2542,23 is stored in
Data_a it looks in the file like this:
-000000254223
My intention is to read the data to a similar edited fields like:
01 Datax.
03 Datax_a pic -9(13)V(2).
03 Datax_b pic -9(13)V(2).
03 Datax_c pic -9(13)V(2).
03 Datax_d pic -9(13)V(2).
Then I try to move for example the Datax_a-field
to this edited field:
01 Edited_b pic -B---B---B---B--9,99
so that when we print the value it should look like this
-2 542,23
And this is were it all goes wrong. When I move the edited
Datax_a -field to Edited_b it looks like:
-25,42
So where did my decimal part go? It looks like that only
the integer part has been move to Edited_b and it's in the wrong
place.
I've also tried to move the Datax_a first to pic s9(13)V(2) and then
to Edited_b with no luck. I've also tried to make Edited_b bigger and smaller,
added and removed those minus signs and B's, but nothing really helps.
Sorry for my bad English,
thanks in advance
Sakke