Using Multiple Verb Commands in Requests

Although each of the sample requests in this Primer uses one verb command at a time, you can use up to sixteen different commands in a single request, to get multiple levels of aggregation.

In a multi-verb request, LIST or PRINT must be the last command in the request. Other preceding display commands must be aggregating commands. An easy way to remember this is, before you display fields (PRINT, LIST), you need to decide what you want to do to them (SUM, COUNT).

Also, when you use a sort phrase with a verb, the verb phrases following it must repeat the same sorting phrase using the same order. In this example, the first sorting phrase (BY DEPARTMENT) is repeated before a new sort phrase (BY CURR_JOBCODE) is added.

Issue the following request:

TABLE FILE EMPLOYEE
SUM ED_HRS BY DEPARTMENT
PRINT LAST_NAME FIRST_NAME BY DEPARTMENT BY CURR_JOBCODE
END

Run the request. The output is:

Note: ED_HRS aggregates to the DEPARTMENT level. LAST_NAME and FIRST_NAME are based on CURR_JOBCODE within DEPARTMENT.

WebFOCUS

Feedback