×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
On 5/9/2013 11:58 AM, Florin Todor wrote:
Did you have a chance to look at my code to see what am I doing wrong here?
I forgot to add the DDS Description for the field, though; here it is:
D1CHGAMT 12P 2 COLHDG(' ' ' ' 'Charge')
It works fine for me. Here's my version of your program in debug:
1 D ds_detD01 e ds extname(testf:*output)
2=D D1CHGAMT 12P 2
3 D ds_hresD01 ds qualified inz
4 D D1CHGAMT 12 2
5 /free
6 DS_HRESD01.D1CHGAMT = -793.49;
7 eval-corr ds_detD01 = ds_hresD01;
8 return;
> EVAL ds_detD01
D1CHGAMT OF DS_DETD01 = -0000000793.49
In your code, you are setting DS_HRESD01 by copying text to the data
structure.
ds_hresD01 = f_in210txt;
Have you verified in debug that DS_HRESD01.D1CHGAMT is -793.49 just
before the eval-corr?
If I had to guess, I'd guess that f_in210txt just has '000000079349',
but if the subfield is supposed to be negative, it should have the value
'00000007934R', ending in 'R', x'D9'. The x'D' in the last digit makes
the zoned value negative.
In my debug session:
> EVAL ds_hresd01:c
DS_HRESD01:C = '00000007934R'
I'm guessing, maybe wrong, that yours would show
> EVAL ds_hresd01:c
DS_HRESD01:C = '000000079349'
As an Amazon Associate we earn from qualifying purchases.