Carsten’s Corner: Working with Query/400 Profile Options Data Areas

In the previous installment of this column I presented the Set Query Profile Options (SETQRYPRFO) command, which allows you to tailor various runtime options and batch job attributes for the Query/400 Work with Query (WRKQRY) command and relies on the special query profile options data area QQUPRFOPTS. This time around I’ve created the Work with Query Profile Options (WRKQRYPRFO) command that will help you monitor and manage your query profile options data areas.

The purpose of creating and configuring the QQUPRFOPTS data area in different libraries is to support different settings for different user profiles. In order to do so you need to ensure that the library containing the QQUPRFOPTS data area designated for the respective user profile is placed ahead of other libraries containing a QQUPRFOPTS data area in the user’s library list or to exclude these other libraries from the library list altogether. Whenever you evoke the WRKQRY command, Query/400 uses the job’s library list to locate the QQUPRFOPTS data area and attempts to read the first one found.

Note, that if the current user profile does not have sufficient authority to the resolved QQUPRFOPTS data area, the system uses default values for the attributes defined in the data area. So make sure the users have authority to the first ocurrance of the data area in their library list.

At this point the WRKQRYPRFO command comes in handy in terms of getting an overview of existing QQUPRFOPTS data areas and what libraries they reside in. The command also provides access to a number of commands related to the task of creating and maintaining these data areas.

Download the save file containing the source code.

Read the entire article.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s