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



Hello,

If IBM changes the max length of variable length fields (and DS, and
regular fields) to 16MB, then I suspect that they will increase the
hidden length attribute to 10I0 or 10U0. Which would mean "4" would
be the, then, correct magic number.

Gosh, if IBM changes the prefix from a 2-byte field to a 4-byte field, I sure hope they provide a different data type, so that we have VARYING and BIGVARYING or VARYING4 or something like that.

I'd hate to think that they'll arbitrarily change the way the VARYING keyword works all of a sudden in some release. Because I use socket and IFS APIs a lot, I often code things like %addr(Field)+2, and %size(Field)-2 for things like the read() and recv() API.

If they say something like "fields less than 64k use 2 bytes, fields greater than 64k use 4 bytes" then I think we'll lose some advantages as well. It might be nice to have a subproecedure that today accepts a field that's 1k long as a parameter, but next year, it might need to be increased to 100k. I'd hate to have to recompile every single caller because the prefix size changed from 2 bytes to 4 bytes. I'd like to be able to force the prefix size to 4 bytes, even for small fields!

Plus, there are existing tools that use a 4-byte prefix. For example, the scratchpad option used in SQL UDFs is always prefixed by a 4-byte binary length. It'd be nice to have the option to use a VARYING4 (or whatever) field for this sort of thing rather than being forced to use a data structure and do the work manually. If IBM automatically adjusts the prefix size based on field length, we'd only be able to use VARYING when the field is long, not when it's short, which would be inconvienient.

The point of all of this... it should be reasonable to use a constant for the length of 2 or 4, since the data type should be clearly specified at compile-time. I agree that a BIF of some sort might make the code easier to read, but I *sure* hope that IBM doesn't automatically adjust the length of the prefix for VARYING. Give us control over that!!

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.