× 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 think the questions should be "what's the best way to integrate the IFS
with RPG's file handling?"

I'll throw out a few ideas and you can all shoot holes in them:

On the Filespec:

    1. Only allow Input or Output on the file spec.

    2. Don't put a record length.

    3. Add a keyword for the external file name similar to the member name
now available in v5r1.


For the Calculation specs:

    1. Use the READ into DataStructure format.  This could work a couple of
ways:

        a. Read delimited -- read the input stream into a separate DS
subfield, using EVAL rules, up to user-specified delimiter.

        b. Read by size -- read x characters into the DS, where x is the
size of the DS.

    2. Use the WRITE from DataStructure format.  Again:

        a. Write delimited.

        b. Write by size.

It doesn't have to handle every possible way to read/write a stream file,
just the most common.

Peter Dow
Dow Software Services, Inc.
909 793-9050 voice
909 522-3214 cellular
909 793-4480 fax



> > I have a question...
> > Does anyone want to access IFS files from within RPG?
> > I don't just mean by prototyping the C/Unix APIs, but in a robust
> > RPG-like manner?
> > I'm thinking along the lines of ext files for storing simple values,
> > perhaps as a replacement for data areas and control database files.


> OK, why didn't we implement native IFS I/O in RPG?  First, we looked
> at enhancing the file specs and I/O calc operations.  Problem is
> that although the native file I/O matches quite nicely fixed-length
> database records, it does not nicely match varying length records in
> stream I/O.  Second, we looked at implementing built-in functions.
> But since these would simply be wrappers to the Posix API's anyways,
> we didn't see much point in that either.





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.