QUERY

The SQL query that will be used to collect data from the application.

Possible values
  • A valid SQL SELECT statement
  • REUSE(subpanel_name)

    uses the data retrieved by the query in the specified subpanel.

All columns (attributes) in a query must be from the same table (attribute group), with a maximum of 100 columns specified on the query. Variables can be used anywhere in the QUERY statement, but only columns specified in a preceding panel can be used as variables.
Note: Variables can be used anywhere in the QUERY statement. Column names do not need to be preceded by table names.
Default value
None

Example 1: Queries with SELECT statement

QUERY='SELECT CICSPLEX, PLEXCPUP, PLEXSOS, PLEXRATE, PLEXMAXT, 
PLEXENQW, PLEXHSCI, FROM OMCICS.PLEX'
QUERY='SELECT TRANID, TASKNO, RTYPE, RNAME, STATE, CPUTIME, SUSPTIME,
ELAPTIME, USEDA16, USEDB16, ATCHTIME, TIMEOFSU, SUSPDUE, FACTYPE, 
FACID, ORIGTRID, UMBTRID, QUEUE, FIRSTPGM, CURRPGM, USERID, EXECCMD, 
PURGEABL, PURGSTAT, SUSPTYPE, UOWSTATE, 
FROM OMCICS.CICSTRD,                                           
WHERE ORIGINNODE = "&SYSTEMID.&CICSNAME"           
AND CICSTRD.TRANID = "&TRANID"                                  
AND CICSTRD.TASKNO = "&TASKNO"'

Example 2: Reused query

<SUBPANEL>         This is subpanel #1 with a query 
NAME=ALPHA         This is its name 
QUERY="SELECT ......... 

<SUBPANEL>         This is subpanel #2 with a query 
NAME=BETA          This is its name 
QUERY="SELECT ......... 

<SUBPANEL>         This is subpanel #3 with no query 
NAME=GAMMA         This is its name 
QUERY=REUSE(ALPHA) Re-using first query