× 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 run into the same limitation and use :

when numberofkeys = 1 ;
setll %kds(KeyGroup_ds: 1) ttvlcdl01;

when numberofkeys = 2 ;
setll %kds(KeyGroup_ds: 2) ttvlcdl01;

.....

----- Original Message ----- 
From: "Simonse, Arco (CMK)" <ArcoSimonse@xxxxxxxxxxxxxxxxx>
To: "RPG400-List Midrange.com" <rpg400-l@xxxxxxxxxxxx>
Sent: Friday, May 27, 2005 4:44 PM
Subject: %kds flexible number of keys


Hello,

I'm using %KDS to read records based on the contents of a datastructure.
I would like to be flexible in the choice of the number of keys to use
for the read. How many keys the function has to use, depends on
calculations in other procedures.
So I thought to use a variable as second argument for the %KDS BIF.

But when I code like this:  setll %kds(KeyGroup_ds: KeyNum) ttvlcdl01

I become:

Message ID . . . . . . :   RNF7705       Severity . . . . . . . :   30

Message type . . . . . :   Diagnostic



Message . . . . :   The second parameter for %KDS is not valid.

Cause . . . . . :   The second parameter for %KDS must be a numeric
value with
  zero decimal positions known at compile-time.

That sounds clear: The compiler wants to know the number at
compile-time.

Question: Does someone know if there is a trick or workaround to work
with a flexible number of keys?

Thanks,
Arco Simonse
pgmr

DISCLAIMER:
This message contains information that may be privileged or
confidential and is the property of C.Meijer B.V. It is intended only for
the person to whom it is addressed. If you are not the intended recipient,
you are not authorized to read, print, retain, copy,disseminate, distribute,
or use this message or any part thereof. If you
receive this message in error, please notify the sender immediately and
delete all copies of this message.

This footnote also confirms that this email message has been swept by the
presence of computer viruses


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.