If you have lengthy defines, or share defines with others, they can be stored separately to simplify maintenance and then be incorporated into report requests using the -INCLUDE command. The -INCLUDE command calls in procedures when the report is executed.
For example, the define below creates a new field named EEGROUP. Assume the procedure containing the define is named GROUPS and is stored in the common library. Note that only the commands required for beginning and ending the defined field are stored.
-* REPORT REQUEST: GROUPS
DEFINE FILE AC ADD
EEGROUP/A10 = IF AC:CBID EQ 'R03' THEN 'FACULTY' ELSE
IF AC:CBID EQ 'MPP' THEN 'MANAGEMENT' ELSE 'STAFF';
To use the field EEGROUP in a report request (e.g. as a sort field, verb field or part of a screening statement), use the -INCLUDE command after executing the standard defines or the join. Note the procedure GROUPS defines can only be called into requests using the AC file. In the example below, the EEGROUP is used as a sort field.
-* REPORT REQUEST: EESTATS
TABLE FILE AC
For more information on the -INCLUDE command, refer to your FOCUS documentation.
Last Updated: July 2, 2004