|
I also use that method (key1 : key2 : key3) in other situations and found it very useful. But here I have to code for key structures with many fields. It depends on calculations in the code for how many keys the file would be updated. The number of keys to be used can vary from 7 keys to 19 keys for example. Now I just repeat the code: when KeyNum = 7; setll %kds(KeyGroup_ds: 7) ttvlcdl01 when KeyNum = 8; setll %kds(KeyGroup_ds: 8) ttvlcdl01 ...... when KeyNum = 19; setll %kds(KeyGroup_ds: 19) ttvlcdl01 In this way I become a lot of repeating code and I would try to avoid that. > -----Oorspronkelijk bericht----- > Van: rpg400-l-bounces@xxxxxxxxxxxx > [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Namens Alan Campin > Verzonden: vrijdag 27 mei 2005 19:59 > Aan: rpg400-l@xxxxxxxxxxxx > Onderwerp: %kds flexible number of keys > > Why use %kds at all. Just use > > Setll KeyField1 FileName > > or > > Setll (KeyField1:KeyField2) FileName > > etc.... > > Used to use %kds but don't since I found this trick. > -- > 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. > > 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 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.