Reference: |
Variables are case and white-space sensitive. For example, TIME is a different variable than time. The following sections list all the variables provided in a rule file. A MULTI can have from 1 to 256 values.
These rules apply to all of the variables listed.
In an assignment, a premise, or a conclusion in a rule, variables are always referenced by themselves or with the NOT operator. For example, IF simple1 or IF NOT simple1
The following table lists and describes the NUMERIC variables available in BRL.
Variable |
Description |
---|---|
Current Time Threshold |
The threshold in effect for elapsed or CPU time in seconds for the current date and time. |
Current Rows Threshold |
The threshold in effect for the maximum size of the requested result set. |
Time Threshold |
The threshold estimated by the rule file for elapsed or CPU seconds. |
Rows Threshold |
The threshold estimated by the rule file for maximum size of result set. |
Rule Number |
An arbitrary number assigned to a rule to enable the reference of what rule did or did not cancel a request. |
Day of Week |
The day of the week indicated as 0 - 6, where 0 is Sunday and 6 is Saturday. |
Extra Number |
Defined for use by business rules. |
Number of unions |
The number of UNION statements contained in the request. |
Number of union alls |
The number of UNION ALL statements contained in the request. |
Number of tables |
The number of tables or data sources contained in the request. |
Number of relations |
The number of relational clauses contained in the request. |
Number of group bys |
The number of GROUP BY columns contained in the request. |
Number of order bys |
The number of ORDER BY columns contained in the request. |
Number of functions |
The number of functions contained in the request. |
Number of columns |
The number of columns contained in the request or records inserted into the table SMCOLUMNS. It is primarily the number of columns selected except when an asterisk is used. In that case, the number of columns is one. |
Record Limit |
Contains the RECORDLIMIT value if any was used with the TABLE syntax in the current report request being governed. |
Ioresult |
Available for any use initialized to zero. |
Lineptr |
Available for any use initialized to zero. |
The following table lists and describes the SIMPLEFACT variables available in BRL.
Variable |
Description |
---|---|
Correlated query |
Used by the automated rules created with GKERULE, and can be used in business rules as well. Contains true when the current request is relational and correlated. |
Select asterisk |
Used by the automated rules created with GKERULE, and can be used in business rules as well. Set to true if an asterisk was used to SELECT or PRINT from a request. |
Bad or not condition |
Used with the %ORNOTERR function. Identifies whether an invalid logical combination of not/or conditions are specified in the current SQL WHERE clause. |
Distinct columns |
Used with the %DISTINCT function. Specifies whether the SQL DISTINCT parameter was used in the current query. |
Temporary field |
Contains true or false for any temporary computes or defines issued at runtime in the request. |
Relational source |
Contains true for relational data requested. |
The following table lists and describes the STRING variables available in BRL.
Variable |
Description |
---|---|
User ID |
The ID of the client connected to the server. |
Reason |
An eight-character string that contains a reason why the Governor decided what it did. This value is stored in the Usage Monitor table, SMGOVERN. |
Current Date |
The current date in the form YYYYMMDD. |
Hours and minutes |
The current time in the form HHMM. |
Message1 |
The first string defined that can contain a custom message. It is always returned to the server. It is used if there is a value assigned to it and overrides the standard cancellation message. |
Message2 |
The second string defined that can contain a custom message. It is always returned to the server. It is used if there is a value assigned to it and Message1. |
Message3 |
The third string defined that can contain a custom message. It is always returned to the server. It is used if there is a value assigned to it and the preceding message strings. |
Message4 |
The fourth string defined that can contain a custom message. It is always returned to the server. It is used if there is a value assigned to it and the preceding message strings. |
Message5 |
The fifth string defined that can contain a custom message. It is always returned to the server. It is used if there is a value assigned to it and the preceding message strings. |
Format |
A string value unused at this time. Available for any use in business rules. |
Extra String |
A string value unused at this time. Available for any use in business rules. |
Run |
The indicator for whether the decision is to run or cancel the request. It is initialized to T. Business rules can set it to F if desired, which causes the request to cancel. |
Right |
An extra string variable available initialized to "R". |
Shift |
Contains the current governor parameter name that is active. |
Request Type |
Contains the current request type being processed. "T" for TABLE, "S" for SQL SELECT, see more in Appendix B under table name SMQUERY, column name SMRECTYPE. |
Procedure |
Contains the current procedure name running. |
Connection Address |
The IP address of the connecting process. |
HOLD Format |
The FORMAT used with the HOLD command in TABLE syntax if used or blank. |
Monitor |
Contains the current Monitor Preference setting. |
DDN 1 |
Available for any use in business rules. |
DDN 2 |
Available for any use in business rules. |
DDN 3 |
Available for any use in business rules |
DDN 4 |
Available for any use in business rules |
DDN 5 |
Available for any use in business rules |
Tablename 1 |
Available for any use in business rules |
Tablename 2 |
Available for any use in business rules |
Tablename 3 |
Available for any use in business rules |
Tablename 4 |
Available for any use in business rules |
Tablename 5 |
Available for any use in business rules |
Dynam data |
Available for any use in business rules |
Dynam data 1 |
Available for any use in business rules |
Dynam data 2 |
Available for any use in business rules |
Dynam data 3 |
Available for any use in business rules |
Dynam data 4 |
Available for any use in business rules. |
The following table lists and describes the MULTI ATTRIBUTE variables available in BRL.
Variable |
Description |
---|---|
TableName |
Used by the automated rules created with GKERULE. |
Relation |
Used by the automated rules created with GKERULE. |
Table |
Used with the %TABLES function. Its values are the table names specified in the SQL FROM clause of the current query. |
Column name |
Used with the %COLUMNS function. Its values are the column names used in the SQL SELECT clause of the query. |
Relational |
Used with the %RELOPCOL function. Its values are the relational statements from the SQL WHERE clause with the right-hand side specified as LITERAL or FIELD. For example, WHERE (SMQUERY.SMKEY = SMFROMS.SMKEY) AND (SMQUERY.SMDATE > '19960101') would become the values: SMQUERY.SMKEY.EQ.FIELD and SMQUERY.SMDATE.GT.LITERAL |
Left relational column |
Used with the %LEFTREL function. Its values are the left-hand side of the relational statements specified in the SQL WHERE clause. Using the previous example, the values would be: SMQUERY.SMKEY and SMQUERY.SMDATE |
Right relational column |
Used with the %RIGHTREL function. Its values are the right-hand side of the relational statements specified in the SQL WHERE clause when a field is specified. Using the previous example, the only value used would be: SMQUERY.SMKEY |
Group by column |
Used with the %GROUPBY function. Its values are the column names specified in the SQL GROUP BY clause of the current query. |
Order by column |
Used with the %ORDERBY function. Its values are the column names specified in the SQL ORDER BY clause of the current query. |
Function name |
Used with the %FUNCTION function. Its values are the function names specified in the SQL WHERE clause of the current query. |
Function column |
Used with the %FUNCOLS function. Its values are the function and column names specified in the SQL WHERE clause of the current query. |
Relational operator |
Used with the %RELOPS function. Its values are the relational operators specified in the SQL WHERE clause. Using the previous example, the values EQ.FIELD and GT.LITERAL would be used. |
Relational statement |
Used with the %RELATION function. Its values are the entire relational statements from the SQL WHERE clause. Using the previous example, the values used would be SMQUERY.SMKEY.EQ.creator.SMFROMS.SMKEY and SMQUERY.SMDATA.GT.19960101 |
Table relations |
Used with the %RELTABS function. Its values are the table names relation from the SQL WHERE clause. Using the previous example, the value used would be: SMQUERY.EQ.creator.SMFROMS |
WebFOCUS |