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




Yes, RPG supports variable length records.

I assume by "variable length records" you mean records where part/all of the field is stored outside of the record buffer itself. This lets you save disk space by not allocating the full space of a field.

RPG definitely supports this. It supports it both through it's native I/O interface and through SQL. I've used it many times.

The other way to interpret your question is... does it support reading stream files where the records are variable length, for example a text file where records are delimited by CRLF.

If that's what you're asking, then, yes, RPG supports it the same way that C and COBOL support it, via APIs. RPG can call all of the same APIs that C can. Unfortunately, the problem here is programmer knowledge. Every C programmer on the planet knows how to deal with files of this sort. Even though RPG can do it the exact same way, the average RPG programmer doesn't know how to read it.

Over the past 5 years, I've put a lot of effort into changing that. And today, quite a few more RPG programmers are familiar with this type of programming than there were before I started, but still not the majority.

But the answer in both cases is definitely YES IT CAN. (Unless, of course, you're talking about an old, obsolete version of RPG, in which case all bets are off.)


On Thu, 31 Aug 2006, fbocch2595@xxxxxxx wrote:

Hi, can the AS400 process variable length records using RPG? I'm told it can not.


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.