In my previous article, Query Governor Control System for V5R4 [2], I presented the ADDUSRQRYA (Add User Query Attributes), CHGUSRQRYA (Change User Query Attributes), and RMVUSRQRYA (Remove User Query Attributes) commands.
Today, I combine these three user query attributes commands with the Work with User Query Attributes (WRKUSRQRYA) command, which offers a convenient and useful interface to select user profiles and work with a profile's user query attributes.
Here's a look at this new command's work-with panel: Work with User Query Attributes WYNDHAMW
05-08-08 10:44:25
User . . . . . . . D*________ Position to . . . _________
Type options, press Enter.
2=Change 4=Remove 8=Work with user jobs
User Interactive Force interactive Options
file
Opt Profile Time limit Query Library
__ DRIEHL *NOMAX *NO DRLIB
__ DYLANB *QRYTIMLMT *NO QUSRSYS
Bottom
Parameters or command
===>______________________________________________________________________________________________________________________
F3=Exit F4=Prompt F5=Refresh F6=Add F8=Create query options
file
F9=Retrieve F12=Cancel
The panel also provides a function to correctly create new QAQQINI query options files based on the system model file. Further, it allows you to change the user profile selection criteria as well as position the user list at any time.
The WRKUSRQRYA command is based on the following source members:
CBX982 -- RPGLE -- Work with User Query Attributes - CPP CBX982E -- RPGLE -- Work with User Query Attributes - UIM Exit Program CBX982H -- PNLGRP -- Work with User Query Attributes - Help CBX982P -- PNLGRP -- Work with User Query Attributes - Panel Group CBX982V -- RPGLE -- Work with User Query Attributes - VCP CBX982X -- CMD -- Work with User Query Attributes CBX982M -- CLP -- Work With User Query Attributes - Build command
To have the command created for you, compile and run the CBX982M CL program, following the instructions in the source header.
You can download a zip file containing all the source code from this link. [3]
In an upcoming issue of this newsletter, I'll provide the missing link and final component, the Set User Query Attributes (SETUSRQRYA) command.
The SETUSRQRYA command performs the actual setting of the query attributes specified for the current user profile or its group profile, if you prefer. The SETUSRQRYA command will be accompanied by a CMDUSRQRYA menu as well as a sample routing program executing the SETUSRQRYA command at job initiation time.
Links:
[1] http://systeminetwork.com/author/carsten-flensburg
[2] http://systeminetwork.com/article/query-governor-control-system-v5r4
[3] http://systeminetwork.com/files/wrkusrqrya.zip