Variables
How to use variables
Variable use | Examples | Where used in program |
|---|---|---|
dmtable tablepart dbname | Setting input table name (16), SQL (26, 29) | |
report title | title | Optional report title (20) |
rpt.page# | Page number (10) | |
rpt.line# | Line number (not shown) | |
volume | Title’s input identifier (20), SQL(27) | |
format identifier | format | Format definitions (3-6, 8-14), Report initialization (18), write (38) |
vl.volid | Value line (5) | |
REXX EXEC PARMS | ssid, plan and dbname, tbname, volume, workid | Parse arg (15), CONNECT (17) |
Input table-name
The asualias REXX EXEC returns the corresponding alias name to the input-table-name variable.
In the following example, the Database Space Trend Report identifies the table partition tables and index partition tables with the code. The SQL plan that the reports use must use DYNAMICRULES(BIND) to bind to the tables through the alias and qualifier on the plan.
indexpart = asualias('BMCASU_SINDEXPART')
Page number and line number
The ASURXRPT external function sets both the page number variable (rpt.page#) and the line number variable (rpt.line#).
Report-dependent variables
The report-dependent variables, or parameters, are in the online dialog under the PARMS input line as in the following example.
* Parms
* ssid plan action service
The PARMS input line automatically supplies the current SSID and report plan. Some of the report-dependent variables permit wildcards. For example, in the PARM for the Action Report, you can use wildcards for the action name and the utility name. The following figure shows the PARM input of an Action Report. The report-dependent variables ( V% and %COPY ) specify all actions that begin with the letter V and contain any kind of COPY utility step.
Wildcards in report-dependent variables
report-name ssid plan wkid utility
Value-line fields
The fields in the value line contain literals or variables. In detail lines, the value-line fields represent input from table columns, such as VOLID and FREETRK, or they represent values derived in the report program. The field names contain the cursor name and the name of the table column, using the following format:
The first format produces names such as vl.volid and vl.freetrk, as follows:
13 format.2 = ' vl.volid vl.freetrk'; 2 value-line fields
The cursor name, such as VL, is declared in the OPEN cursor statement, as in lines 22 and 23. The column names repeat immediately below OPEN cursor (lines 24 and 25). The column names in the format definition must match the column names in the SQL or a derived value, as follows:
23 'VL CURSOR FOR SELECT ',
24 'VOLID ,' ,
25 'FREETRK ' ,
REXX EXEC PARM
The REXX EXEC PARM in the JCL passes information to the report programs.
Report-dependent variables provides an example of input parameters. Sample report describes the PARM values.