|
It's the query options file.Dan W.
Creating the QAQQINI query options fileEach system is shipped with a QAQQINI template file in library QSYS. The QAQQINI file in QSYS is to be used as a template when creating all user specified QAQQINI files. To create your own QAQQINI file, use the CRTDUPOBJ command to create a copy of the QAQQINI file in the library that will be specified on the CHGQRYA QRYOPTLIB parameter. The file name must remain QAQQINI, for example: CRTDUPOBJ OBJ(QAQQINI) FROMLIB(QSYS) OBJTYPE(*FILE) TOLIB(MYLIB) DATA(*YES) Because system-supplied triggers are attached to the QAQQINI file in QSYS it is imperative that the only means of copying the QAQQINI file is through the CRTDUPOBJ CL command.
QAQQINI query options file formatQuery Options File: UNIQUE
R QAQQINI TEXT('Query options + file')
QQPARM 256A VARLEN(10) +
TEXT('Query +
option parameter') +
COLHDG('Parameter')
QQVAL 256A VARLEN(10) +
TEXT('Query option +
parameter value') +
COLHDG('Parameter Value')
QQTEXT 1000G VARLEN(100) +
TEXT('Query +
option text') +
ALWNULL +
COLHDG('Query Option' +
'Text') +
CCSID(13488) +
DFT(*NULL)
K QQPARM
The QAQQINI file shipped in the library QSYS has been pre-populated with the
following rows:
Setting the options within the query options fileThe QAQQINI file query options can be modified with the INSERT, UPDATE, or DELETE SQL statements. For the following examples, a QAQQINI file has already been created in library MyLib. To update an existing row in MyLib/QAQQINI use the UPDATE SQL statment. This example sets MESSAGES_DEBUG = *YES so that the query optimizer will print out the optimizer debug messages: UPDATE MyLib/QAQQINI SET QQVAL='*YES' WHERE QQPARM='MESSAGES_DEBUG' To delete an existing row in MyLib/QAQQINI use the DELETE SQL statement. This example removes the QUERY_TIME_LIMIT row from the QAQQINI file: DELETE FROM MyLib/QAQQINI WHERE QQPARM='QUERY_TIME_LIMIT' To insert a new row into MyLib/QAQQINI use the INSERT SQL statement. This example adds the QUERY_TIME_LIMIT row with a value of *NOMAX to the QAQQINI file: INSERT INTO MyLib/QAQQINI
VALUES('QUERY_TIME_LIMIT','*NOMAX','New time limit set by DBAdmin')
QAQQINI query optionsThe following table summarizes the query options that can be specified on the
QAQQINI command: Table 9. Query Options Specified on QAQQINI
Command
QAQQINI query options file authority requirementsQAQQINI is shippped with a *PUBLIC *USE authority. This allows users to view the query options file, but not change it. It is recommended that only the system or database administrator have *CHANGE authority to the QAQQINI query options file. The query options file, which resides in the library specified on the CHGQRYA CL command QRYOPTLIB parameter, is always used by the query optimizer. This is true even if the user has no authority to the query options library and file. This provides the system administrator with an additional security mechanism. When the QAQQINI file resides in the library QUSRSYS the query options will effect all of the query users on the system. To prevent anyone from inserting, deleting, or updating the query options, the system administrator should remove update authority from *PUBLIC to the file. This will prevent users from changing the data in the file. When the QAQQINI file resides in a user library, specified on the CHGQRYA CL command option QRYOPTLIB, the query options will effect all of the querys run for that user's job. To prevent the query options from being retrieved from a particular library the system administrator can revoke authority to the CHGQRYA CL command.
QAQQINI file system supplied triggersThe query options file QAQQINI file uses a system-supplied trigger program in order to process any changes made to the file. A trigger cannot be removed from or added to the file QAQQINI. If an error occurs on the update of the QAQQINI file (an INSERT, DELETE, or UPDATE operation), the following SQL0443 diagnostic message will be issued: Trigger program or external routine detected an error.----- Original Message -----
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.