× 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.



Thank you for your e-mail, Barbara, and yes, I verified in debug session that DS_HRESD01.D1CHGAMT has a negative value right before eval-corr and the correspondent field has positive value right after eval-corr:

ds_hresD01 = f_in210txt;
// DS_HRESD01.D1CHGAMT = -793.49 <---- from Debug session
eval-corr ds_detD01 = ds_hresD01;
// D1CHGAMT OF DS_DETD01 = 0000000793.49 <---- from Debug session

Is it possible to be some PTF's missing here? We are in V6.1


Florin Todor


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Barbara Morris
Sent: Thursday, May 09, 2013 5:46 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Eval-corr

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.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.