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



Thanks....they are input only anyway.  Old, lazy habits die hard.....

SETLL work the same way then with multiple keys? i.e.

SETLL (count# : Crt(count#)) PPCS105;

I'll give it a whirl...

Pete



Ellsberry, Steve wrote:

Nice. But why all the chains. CHAIN FYKEY FPCS101
If %Found
Can just as easily be done with SETLL FYKEY FPCS101
If %Equal

No actual IO and if FPCS101 happens to be defined as "U"pdate "F" ull
procedural in your "F" specs then no record locks.

It's just a suggestion and ya know, suggestions are like....... Everyone has
one....

S. Ellsberry




-----Original Message-----
From: Pete Helgren [mailto:Pete@xxxxxxxxxx] Sent: Thursday, October 20, 2005 11:21 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Chaining with multiple key fields

Here is the whole tamale:

   C/Free
        IF  #$FY  >  50;
             FYKEY = 1900 + #$FY;
         ELSE;
             FYKEY = 2000 + #$FY;
       ENDIF;

     CHAIN FYKEY FPCS101;
IF %FOUND;

        Count# = 1;

        dow Count# <= 5;

        if COCrt(count#) <> *blanks;
if COPOSN = Count#;
             Chain Crt(count#) PPCS120;
             If %found;
               Sht(count#) = PDSHRT;
               lng(count#) = PDDESC;
             ENDIF;
          else;
           Chain (count# : Crt(count#))  PPCS105;
             If %found;
               sht(count#) = CCSHRT;
               lng(count#) = CCDESC;
             ENDIF;
          ENDIF;
        Endif;
        Count# = Count# + 1;
        ENDDO;
      ENDIF;
 /End-Free

I don't see anywhere that I missed a closing ";" or paren or whatever but
these eyes have just about had it today.....

Pete

Scott Klement wrote:

284 Chain (count# : Crt(count#)) PPCS105; ======> a b ccc *RNF5309 30 a 002626 Factor 1 operand is not valid. *RNF5031 20 b 002626 Result-Field operand is not valid. *RNF5507 30 c 002626 A semi-colon is not specified at the end of a free-
                        specification.
What does the statement BEFORE this one look like. Does it have a semi-colon at the end?

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.

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.