× 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 have been following the discussion with interest.
"The OS is smart enough to pad out the field" when processing, and RPG buffers are sized at the maximum."

Here is our case: our Bill of Lading numbers are defined as 30A. But in one file, CUPMIFH, the BOL was defined as 15A.
Most of our Bills of Lading are 7 or 8 char, and it was only once or twice we found the 15A exceeded.
We have installed a fix in the RPG program where this surfaced as a problem, so we have the problem resolved for now.

But when / if we were to address this mismatch . . . by redefining the problem file, . . . would it make sense to define the BOL field as 30A VARLEN(15) ?
Are there any advantages to making the field VARLEN ?

.+ One advantage we see is that SQL joins would be more reliable and simpler to construct.
. - But we still have to recompile all RPG programs that are using this problem file, correct ?

So if we are recompiling, we are more likely to go with the existing 30A and not use VARLEN.

As far as saving DASD space, I believe it would be trivial, as the detail file with the field BOL is only 2.2 GB ( 1.4 mill records ),
and there are other files with BOL scattered throughout the module in question. But the space savings of 5A ( actually 5A - 2A for LEN ) is nominal.

So I assume that if we really wanted to gain any advantage,
it would be to convert the entire system to use the VARLEN(15).

And in actuality, I believe that if we defined the system using SQL Tables and Views instead of DDS,
then we would likely gain more in CPU savings than anything we might achieve with database field sizes.


John Voris
Crown Americas LLC


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.