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



Yes. The actual values in the fields are from a screen that has been read with EXFMT

I *think* the problem is that #FLD contains the field name as a literal value e.g. #FLD = 'LOC1' and Loc(count#) is the value of the data in the field (not the name of the field, which is what I want to compare to).

So rather than using Loc(Count#) perhaps I should use something like 'LOC' + %char(count#) which would render to LOC1 when count = 1.

So If #FLD = 'LOC' + %char(count#);
may work.

I may give that a whirl...

Thanks.

Pete


Tim Kredlo wrote:

Are you setting the values for LOC1 thru LOC10 anywhere?
They are all blanks per your code.

Tim Kredlo
Exterior Wood, Inc

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Pete Helgren
Sent: Friday, July 01, 2005 12:05 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Multiple sequentially numbered fields and indicators in /FREE -
New Wrinkle


Wow! That worked great!  Compiled the second try!

But I have a new wrinkle that I need help with.

One of the functions I have is to prompt for values in each of the fields, allow a user to select a value and return it to the field. With this new loop logic my old way of doing it doesn't seem to work.

The new data structure:

    DLocFields        DS
    D  LOC1                          6A
    D  LOC2                          6A
    D  LOC3                          6A
    D  LOC4                          6A
    D  LOC5                          6A
    D  LOC6                          6A
    D  LOC7                          6A
    D  LOC8                          6A
    D  LOC9                          6A
    D  LOC10                         6A
    D  LOC                                Like(LOC1) Dim(10)
    D                                     overlay(LocFields)

Old way:

               if  #FLD = 'LOC1' or #FLD ='LOC2'  or #FLD = 'LOC3'....etc;

                   PmptLoc(#FLD);

endif;
New way:
               for count# = 1 to 10;

               if  #FLD = Loc(Count#);

                   PmptLoc(#FLD);

endif;
In the DDS I have:

A                                      RTNCSRLOC(&#REC &#FLD)


I don't seem to get a match on the FLD# field value. It may say something like 'LOC1 ' and count# may be 01 but the comparison fails.

Any ideas ?

Thanks.

Pete


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.