Creating the QAQQINI query options file
Each server is shipped with a QAQQINI template file in schema 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 Create Duplicate Object (CRTDUPOBJ) command to create a copy of the QAQQINI file in the schema that will be specified on the Change Query Attributes (CHGQRYA) QRYOPTLIB parameter. The file name must remain QAQQINI. For example:
CRTDUPOBJ OBJ(QAQQINI) FROMLIB(QSYS) OBJTYPE(*FILE) TOLIB(MYLIB) DATA(*YES)System-supplied triggers are attached to the QAQQINI file in QSYS therefore it is imperative that the only means of copying the QAQQINI file is through the CRTDUPOBJ CL command. If another means is used, such as CPYF, then the triggers may be corrupted and an error will be signaled that the options file cannot be retrieved or that the options file cannot be updated.
Because of the trigger programs attached to the QAQQINI file, the following CPI321A informational message will be displayed six times in the job log when the CRTDUPOBJ CL is used to create the file. This is not an error. It is only an informational message.
CPI321A Information Message: Trigger QSYS_TRIG_&1___QAQQINI___00000&N in library &1 was added to file QAQQINI in library &1. The ampersand variables (&1, &N) are replacement variables that contain either the library name or a numeric value.
It is highly recommended that the file QAQQINI, in QSYS, not be modified. This is the original template that is to be duplicated into QUSRSYS or a user specified library for use.
Parent topic:
Control queries dynamically with the query options file QAQQINI
Related information
Change Query Attributes (CHGQRYA) command
Create Duplicate Object (CRTDUPOBJ) command