Edit/Execute SQL (Data Set) panel

You use the Edit/Execute SQL (Data Set) panel to edit and execute SQL statements contained in a data set.

Panel and field definitions

  Process   Options   Utilities   Help
 ──────────────────────────────────────────────────────────────────────────────
 FM/Db2 (DFE2)            Edit/Execute SQL (Data Set)

 Input Data Set:
    Data set name . . .                                               
    Member  . . . . . .         
    Volume  . . . . . .       

 SELECT statement options:
    Row count . . . . . 100            Number of rows to browse

 Processing Options:
    Execution options                  Enter "/" to select option
         First column                  /  Edit data set
         Last column                   /  Execute SQL from data set
         Comment chars                    Re-edit data set after execution
                                          Create audit trail (*)



 Command ===>                                                                  
  F1=Help      F2=Split     F3=Exit      F7=Backward  F8=Forward   F9=Swap
 F12=Cancel
Data set name
The name of the data set or PDS member containing the SQL statements you want to edit. It can be a fully-qualified data set name or a pattern. The name may include a member name or name pattern in parenthesis. If the member is specified here, the associated Member field must be empty.
Member
If you specified the name of a partitioned data set (PDS) without including a member name or name pattern in parenthesis in the Data set name field, then you can use this field to specify the member name or a member name pattern.
Volume serial
The serial number of the volume that contains the data set (if applicable).
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.
First column
First data column. When generating SQL statements, FM/Db2 ignores any data to the left of this column number. If you do not specify a value, the statements are assumed to start in column 1.
Last column
Last data column. When generating SQL statements, FM/Db2 ignores any data to the right of this column number. If you do not specify a value, the statements are assumed to continue to the end of the data set record.
Comment chars
Use this option to specify one or two characters (for example --) that denote records in the data set that are comment lines. If the specified characters appear as the first nonblank characters in a data set record (and that part of the statement is not in a quoted string), FM/Db2 ignores the record.
Edit data set
FM/Db2 starts an ISPF Edit session for the specified member or data set.

Use this option to use a library of SQL statements that you can maintain ready for execution.

To leave the Edit session, use the Exit function key (F3). Any changes you have made are saved.

Execute SQL from data set
FM/Db2 reads the data set or member, executes the SQL statements that it can extract, returning the results if applicable.

To execute the next SQL statement in the data set or member after FM/Db2 displays a result table or error panel, use the Exit function key (F3).

To return to the Edit and Execute SQL Statements from a Data Set panel without executing the statements, or at any time when an error or result panel has been displayed, use the Cancel function key (F12).

Re-edit data set after execution
After FM/Db2 has completed executing the statements in the data set, it restarts the Edit session (instead of returning to the Edit and Execute SQL Statements from a Data Set panel).
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.

Parent panels

Child panels

None.

Related tasks