× 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 09 May 2012 06:58, Jack Kingsley wrote:
how many of these (QAQQINI) can you have by library.

On Tue, May 8, 2012 at 3:28 PM, Monnier, Gary wrote:
Could you write an exit program for exit point QIBM_QZDA_SQL2 (an
exit point for QZDASOINIT) that...

1. Swaps to a user profile that can perform the necessary change.
2. Makes the change.
3. Swap back to the calling user profile.



I am not sure what is meant by the "how many" QAQQINI "by library." The name QAQQINI is static, and there is allowed only one object name\type combination per library; the QAQQINI name represents, is implemented as, a database *FILE object. So *per* library, the answer would be one. The CHGQRYA command has a parameter QRYOPTLIB() which can specify the name of a library from which any /query initialization/ options should be read from its QAQQINI file; if one exists.

As for user profile swapping.... I would expect that either a called program or the user exit program itself, could adopt the necessary authority from another user with *JOBCTL special authority, to effect the CHGQRYA.? Within the exit program however, the authority is really just a minor issue anyhow....

Knowing what INI file to activate is surely the major issue for the OP; i.e. currently the desired library name is being passed on the connection string, and so the exit program will need to know how to learn what library name to specify on the QRYOPTLIB() parameter of the CHGQRYA. Pending resolution to that issue, authority is really just an aside. If the connection string is not available to the exit program, then some other means would need to be employed to know what the client wants. What I had originally alluded in conjunction with the exit program, is that the clients may be able to establish an "application identifier" or something else that is available as a SQL Special Register, to replace their client QAQQINILIB specification.

http://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/topic/db2/rbafzspecreg.htm
" ...
The special registers can be referenced as follows:

>>-+-+-CURRENT CLIENT_ACCTNG-+----------+----------------------><
| '-CLIENT ACCTNG---------' |
+-+-CURRENT CLIENT_APPLNAME-+--------+
| '-CLIENT APPLNAME---------' |
+-+-CURRENT CLIENT_PROGRAMID-+-------+
| '-CLIENT PROGRAMID---------' |
+-+-CURRENT CLIENT_USERID-+----------+
| '-CLIENT USERID---------' |
+-+-CURRENT CLIENT_WRKSTNNAME-+------+
| '-CLIENT WRKSTNNAME---------' |
...
"

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.