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



I usually use KLIST's to chain with but I decided to use variables directly in the statement like so (from the ILE RPG Reference):

// Expressions can be used in the list of keys
chain (%xlate(custname : LO : UP) : companyCode + partCode)
custrec;

I coded (in /Free) my chain like this:

           Chain (Count# : Crt(Count#))  PPCS105;

DSpecs:

D Count#          S              1P 0
DCrtFields        ds
D  CRT1                          6A
D  CRT2                          6A
D  CRT3                          6A
D  CRT4                          6A
D  CRT5                          6A
D  CRT                                Like(CRT1) Dim(5)
D overlay(CrtFields)
The keys for the PPCS105 file are defined as:

CCPOS  *PACK           1   0
CCCODE *CHAR 6
The error listing shows:

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.
Which I think is saying, "I don't like any of your syntax".

Perhaps I am just not understanding the use of a chain when there is more than one keyfield in the record but the example in the manual looked pretty straightforward. I can post more code if it would help ID the problem.

Thanks,

Pete Helgren


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.