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



Looks like it came out a month after I caught up with PTF's.
Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> 8/10/2022 2:07 PM >>>
Apologies, I provided the wrong link. Here's what I meant to give you:
https://www.ibm.com/support/pages/node/6120945



On 8/10/22 2:04 PM, Scott Klement wrote:
Hi Buddy,

In Spring 2020, IBM updated RPG to allow a variable on KDS, which can
be enabled via PTFs. More info here:
https://www.geeksforgeeks.org/how-to-increase-heap-size-in-java-virtual-machine/


If you do not (or cannot) install that update, or need to compile your
program for tgtrls(v7r2m0) or older, then you'll need to use a value
(not just definition) that's known at compile time.

-SK

On 8/10/22 12:19 PM, Buddy McClean wrote:
Good Day All,

7.3

I am trying to make the following stmt work. I have never used a 2nd
parm with %KDS, so new territory.

Setll %KDS(KeyWSZ:KeyCnt) WSEQZONE;

When I use the variable KeyCnt for the 2nd parm in %KDS , I get the
error below.

When I substitute the literal 2 for KeyCnt, it compiles fine.
Setll %KDS(KeyWSZ:2) WSEQZONE;

Cause . . . . . : The second parameter for %KDS must be a numeric
value with zero decimal positions known at compile-time. In addition,
the value must not be greater than the number of subfields in the
data structure specified as the first parameter for %KDS. The
operation is ignored.

not sure if the actual value has to be known at compile time or just
the definition. Tried both. I'm guessing since the ibm example
below did not specify a value, that just the dcl is fine.

this is the DS

DCL-DS KeyWSZ;
WhseWS Like(WSWhse);
ZoneWS Like(WSZone);
RowWS Like(WSRow);
END-DS;

this is the dcl for KeyCnt.

DCL-S KeyCnt Int(10:0) inz(2);

This is from the ibm website

D numKeys s 10i 0 ... // The number of
keys can be a constant chain %kds(custRecKeys : 2)
custRec; // The number of keys can be a variable or an
expression numKeys = 1; chain %kds(custRecKeys :
numKeys) custRec; chain %kds(custRecKeys : numKeys + 1) custRec;



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.