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



Michael,

> Is there an API that can get me a list of fields in an
> externally-described file? Any program examples will be a great help.

A request for you:

Please use a subject when you post a message.  Some people, like me,
receive a lot of e-mail.  I weed out threads that I'm not interested in
based on the subject of the message.

Now an answer:

What I'm going to do is tell you how to find out what APIs are available.
I'm loathe to simply start naming APIs, because that encourages people to
ask the list rather than use documentation.

1) Open up your IBM Information Center.  You can use the CDs provided with
OS/400, or view it on the web.  The an easy to remember URL is:
  http://www.iseries.ibm.com/infocenter

2) Once you've selected your region/language/version click on
"Programming" and then "APIs".

3) In a case like this where you don't know the name of the API, but you
do know what the API does, I prefer to use the "APIs by Category" page.
Click "APIs by Category"

4) Since what you're looking for is the fields in a file, the category is
easy to guess...   "Database and File".  So, click "Database and File".

5) If you page down a bit, you'll see a list of APIs and descriptions of
what they do.  There are several that might be apropos...  "List Fields"
or "Retrieve Database File Description" might do the job.  Maybe there are
others that look to you like they might be related.   You can click on
each API to find out more about it, and see what kinds of data it returns.

6) Eventually you'll determine that "List Fields" is probably the best way
to do it.  So, you click on that entry, and you learn about the API.

7) Now you say to yourself "This API looks like the right one, but I'd
like to see an example".  The documentation says that the API is called
"QUSLFLD" so you know that anyone who used it must've used that name
somewhere in their programs.

8) You go to http://www.google.com (or whichever search engine you prefer)
and type QUSLFLD into the search box.  Now you've got a list of examples,
documentation, and other people's questions about the QUSLFLD API.  Many
of them are even from this mailing list!

9) Now, you can read the pages listed for examples, and maybe get your
code working.  If you don't, you can go back and look at the mailing list
archives, and see if someone else had a similar problem.  If so, you may
be able to deduce an answer.

10) Finally, if you're still stuck, after reading the IBM docs and
scouring the internet, post a question here.

Hope that helps!

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.