That is, usually, what I do, Chuck, as our applications were ported from a
S/36 and were never "nativized" so they're still invoked from s/36 menus,
which use OCLs. Just want to be able to make the determination from within
a CL or RPG IV program without having to rely upon a higher level OCL
command for the new functions that I am writing. That is, usually I am
writing something that will be inserted into an existing process (OCL or RPG
II program via a CALL), but I'm writing processes now that do not of
themselves require an OCL.

The data files are easy because they're going to use the library list. What
I was working on, though, that prompted the query had to do with the
printers. We only have a single box, but if I'm in the test environment, I
want to change the printer output to a configured but unattached device so
that (a) I don't waste paper, and (b) don't confuse the staff thinking the
report/form was production.

Jerry C. Adams
IBM i Programmer/Analyst
The road to success is always under construction.
--
A&K Wholesale
Murfreesboro, TN
615-867-5070


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Tuesday, September 13, 2011 12:48 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: 36EE Files Library Determination

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

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.