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



On 13-Sep-2011 09:25 , Jerry C. Adams wrote:
Hate to be old school (trust me!), but is there an API that will
return the value of the Files Library for the 36EE? In OCL one can
use ?FLIB? to retrieve the default library into which objects will be
created or retrieved. I checked the API list (we are on 5.1), but
couldn't find anything that applied, but lots of APIs that returned
the library lists.

I wrote an RPG IV program that reads through the user portion of the
library list. If I find QS36F (the normal value), I assume that I'm
in production. Otherwise, I look for TSTQS36F, which is my test
environment version and, if found, assume I'm in test. If I can't
find either (or I find both), I assume the situation is fubar and
abort.

Just would like a more accurate method.


Why not just use that procedure substitution expression ?FLIB? [(Files Library) expression; or perhaps the ?SFLIB? (Session Files Library) expression?] on a CL command parameter in a procedure to make that value available elsewhere; e.g. CHGDTAARA (QTEMP/FLIB (01 10)) VALUE(?FLIB?) or CALL MYRPGIV PARM(?FLIB?)

Regards, Chuck

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.