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



At 01:52 PM 11/22/02, you wrote:

Clearly, MOVEL is inappropriate since you don't often really know
how much storage is actually allocated.
Not so clearly to me.  I ran a test and set the length of 'entry' to be one
byte, thinking that the movel might overrun the buffer, but it does
not.  Only the first byte of storage got loaded, according to debug.


First, as someone else mentioned, declare your based variable with
some large length, such as 65535. Since no static storage is
allocated, the length doesn't really matter. Then, *only* work with
the data using %SUBST. If the length is maintained in variable
ENTRY_LEN, then use the based variable as %SUBST(ENTRY:1:ENTRY_LEN).
This works on both left-hand side and right-hand side of an EVAL
statement.
I am trying to avoid any length restriction, at least up to the limits of
the ALLOC opcode.


Of course, you're still limited to a maximum of 65535 characters. If
you want to work with more data than that, then you need to manage
the bits and bytes yourself at an even lower level.
The data is of variable length.  I don't know how long it will be.  I do
know that I am restricted to 16M on the alloc, according to the RPGLE
reference manual.  I would like to know whatever the correct solution is to
allow me to reference the entire buffer.

Hmmm.  Can I prototype and call memcpy?  I don't see it in the information
center, but I guess I'll see if I can whip up a test.

Regards,
Rich





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.