Enter, Execute and Explain SQL Statements panel

You use the Enter, Execute and Explain SQL Statements panel to enter freeform SQL statements, run freeform SQL statements, or obtain information about an SQL statement.

Panel and field definitions

  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFG2)          Enter, Execute and Explain SQL

 SELECT Options:                       EXPLAIN Options:
    Row count . . . . . ALL               Query number  . . .           

    Enter "/" to select option         Audit Option:
    /  Show results                       Enter "/" to select option
                                             Create audit trail (*)

 SQL statement:









 Command ===>                                                       Scroll PAGE
  F1=Help      F2=Split     F3=Exit      F7=Backward  F8=Forward   F9=Swap
 F12=Cancel
Row count
Limits the rows loaded into the FM/Db2 editor when the SQL statement being processed is a SELECT statement. To load all rows for the SELECT statement, specify "*" or ALL in this field.
Query number
A number to help identify the results of this explanation. If you leave this field blank, FM/Db2 generates a query number for you in the format YYYYMMDDss, where ss is a sequence number.
Show results
If selected, FM/Db2 attempts to display the relevant rows that Db2® has inserted in the plan table as a result of explaining the statement.
Create audit trail
Note: "(*)" is appended to the option name for SAF-controlled auditing when required by SAF rules.
Controls whether access to Db2® by FM/Db2 is written to the FM/Db2 audit log. This option only appears when SAF-rule controlled auditing is in effect.

FM/Db2 may write audit records to either SMF, or a data set.

When SAF rules are used to control FM/Db2 auditing, the decision to write audit records is based on the Db2® object name being processed, and the current userid (TSO logonid). Therefore auditing may be required when processing one Db2® object, but not another. In addition, it is possible that the auditing requirement cannot be changed for a particular Db2® object; this might be different for another Db2® object, and the requirement may be different for other TSO userids.

If you do not have the authority to change the audit setting when processing a particular Db2® object, FM/Db2 prompts you if you enter the wrong setting. If you do have the authority to set the audit setting for a particular Db2® object, FM/Db2 honors whatever value is specified in this field.

SQL statement
Freeform SQL statement entry area. If you want to enter more than one SQL statement, you must separate the statements with a semicolon (;).

Parent panels

Child panels

None.

Related tasks

Related references