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



Hi Jonathan,

> Has anybody had any experience of using API's to retrieve the contents of PF
> fields?  I've been looking at the API documentation, and the only one that I
> can find that looks like what I need is QDBBRCDS.  The description says
> about bringing the records into main storage, and only provides input
> parameters for the records you want.  How do you reference the records
> afterwards as there's no pointer or anything returned by the API?

AFIAK, there are two ways to read a database without hardcoding the file
format into your RPG program:

a) The ILE C _Ropen(), _Rread(), etc APIs work nicely from RPG. I'm
    using these in my FTPAPI project as part of the process of FTPing a
    database file.

b) SQL allows you to read records with a variable filename/layout as well.
    I don't have any direct experience with this, but many people have
    suggested it before (This question seems to come up at least once
    a month on one mailing list or another.)

You might be interested in Carsten Flensburg's programs that demonstrate
parsing an externally-defined record buffer.  More info can be found at
the following link:
 http://www.iseriesnetwork.com/article.cfm?ID=17381

The link requires a membership to the iSeries Network, but a free
(associate) membership should work.

Good luck


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.