GLOBALS Statement

The GLOBALS statement specifies the values that are used to develop data for reports and output files. Code this statement only if tou need any of the GLOBALS keywords. The keywords apply to all requests running in the data collector or report writer. GLOBALS is primarily used with batch jobs.
caidb219
The GLOBALS statement specifies the values that are used to develop data for reports and output files. Code this statement
only
if tou need any of the GLOBALS keywords. The keywords apply to all requests running in the data collector or report writer. GLOBALS is primarily used with batch jobs.
Each IQL input stream can include a single GLOBALS statement.
The GLOBALS statement
must
end with a semicolon (;).
The GLOBALS statement has the following syntax:
►►─ GLOBALS ┬───────────────────────────────┬─┬─────────────────────────────┬────►
            └ MAXRECS=number of records ────┘ └─ PAGESIZE=number of lines ──┘               
 ►──────────┬───────────────────────────────┬─┬─────────────────────────────┬────►
            └ LINESIZE=number of characters ┘ └─ COLSPC=number of blanks  ──┘               
 ►──────────┬───────────────────────────────┬─┬─────────────────────────────┬ ; ─►◄
            └ PREFIX=node of a DSN ─────────┘ └─ WHERE selection-criteria ──┘                
  • MAXRECS
    Limits the number of DB2 trace records that the data collector or report writer reads. When the specified number of records have been read, an end-of-file condition is simulated. Use this parameter to allow short trial runs to verify that statements produce desired results, without having to process an entire input file.
    If MAXRECS is
    greater
    than the value specified for MAX-TRACE-RECORDS in the 
    CA SYSVIEW for DB2
     security profile, the MAX-TRACE-RECORDS value overrides MAXRECS.
    For example, if you specify MAXRECS=1000, the report writer reads up to a maximum of 1000 trace records.
    Synonym: MR
  • PAGESIZE
    Establishes a default number of lines per page for printed reports. The specified value applies to all reports except when the PS format parameter overrides.
    For example, specify PS=60 to indicate that reports default to 60 lines per page.
    Synonym: PS
  • LINESIZE
    Establishes a default line length for reports that are printed or displayed at 
    CA SYSVIEW for DB2
     terminals.
    The maximum value is 4096.
    The specified value is the maximum line length for all reports unless the LS format parameter overrides.
    For example, specify LINESIZE=80 to indicate that the line length for online or batch reports default to 80 characters.
    Synonym: LS
  • COLSPC
    Establishes a default number of spaces between columns in reports.
    The minimum COLSPC value is 1.
    The specified value applies except when the COLSPC format parameter overrides.
    For example, specify COLSPC=3 to indicate that the gap between columns is three spaces.
    Synonym: SF
  • PREFIX
    Establishes a default first node for a data set name.
    If you code a PREFIX in GLOBALS, it overrides the PREFIX= parameter that is coded in the data collector or Report Writer SYSPARMS.
    To use a GLOBALS PREFIX, code ENFORCE-PREFIX=YES in the data collector or Report Writer SYSPARMS.
    For example, specify PREFIX=GSMW to indicate that all data set names (without quotation marks) referenced in the input stream have a default first node of GSMW.
    In the following syntax, the print file would be written to data set GSMW.DB2.REPORT:
    PRINT(DSN('DB2.REPORT')SHR)
  • WHERE
    Specifies Event Trace Record selection criteria that is applied before any selection by request statements.
    When using the WHERE clause in a GLOBALS statement, you can use only common field names. For more information about these fields, see the “Records and Fields (001-100)” appendix.
    See the Selection-Criteria section for detailed syntax and explanation.
    Examples:
    • Specify the following options to indicate that the request runs only if the SUBSYS and PLAN-NAME fields contain the indicated values:
      WHERE SUBSYS = 'DB2X' AND PLAN-NAME = 'PAY200'
    • Specify the following options to indicate that all the global parameters are being set for this input stream:
      GLOBALS
      MAXRECS=1000
      PAGESIZE=60
      LINESIZE=132
      COLSPC=3
      PREFIX=GSWM
      WHERE EVENT-TIME >= '920901130330' AND <= '92090130430'
             AND PLAN-NAME = 'PAY200'
      In this example, note the following information:
      • The report writer reads up to a maximum of 1000 trace records
      • Printed reports default to 60 lines per page
      • Line length for online or batch reports defaults to 132 characters
      • The gap between columns defaults to three spaces
      • All data set names (without quotation marks) referenced in the input stream have a default first node of GSMW
      In addition, the request reports records that satisfy the following two conditions
      only
      if:
      • EVENT-TIME occurs during the one minute between 1:03:30PM and 1:04:30PM on September 1, 1992
      • PLAN-NAME is equal to PAY200