Editing and executing SQL statements from a data set
If you want to:
- Optionally initiate an ISPF Edit session on a data set or PDS member containing SQL statements
- Run the SQL statements in a data set or PDS member
Note: You cannot use this
option to create a new member.
When you select this option, FM/Db2 displays the Edit and Execute SQL Statements from a Data Set panel.
To use this panel:
- Specify the name of the data set or PDS member containing the SQL statements you want to edit. Use a combination of the Data set name, Member, and Volume serial entry fields.
- To limit the rows loaded into the FM/Db2 editor when the SQL statement
being processed is a SELECT statement, specify the maximum number
of rows in the Row count field on the Edit and Execute SQL
Statements from a Data Set panel.
To load all rows for the SELECT statement, specify * or ALL in this field.
- Set the processing options.
- Press Enter.
If you selected the Edit data set processing option, the contents of the specified data set or PDS member are displayed in an ISPF Edit session. When you have completed editing the SQL statements, press the Exit function key (F3) to run the commands (the Execute SQL from data set processing option must be selected).
If you selected the Execute SQL from data set processing option, but not the Edit data set processing option, FM/Db2 immediately runs the SQL commands in the specified data set or PDS member
Note: If an SQL error occurs, to prevent FM/Db2 executing further
SQL statements, use the Cancel function key (F12) to
return you to the Edit and Execute SQL Statements from a Data Set
panel.
Related tasks
Related references