Saving work buffer contents into a PDS
You can save the contents of any work buffer into a PDS member with the SAVE primary command. When SAVE is executed, a window opens asking if you wish to save the contents into a PDS. Once you make your selection and press <Go>, another window opens where you can enter the appropriate information. (The default data set for the PDS is acquired from your user profile. See PROFILE Selection. File-AID for Db2 Object Administration assigns a default member name which you can change.)
Executing the SAVE command does not remove the JCL from the work buffer.
Retrieving and executing saved statements
To retrieve statements previously saved into a PDS member with the SAVE command, use one of the following methods:
- Use the SHOW primary command with the PDSSEQ keyword; see SHOW-Show-Contents.
You can also use ISPF methods to retrieve a PDS member.
To execute statements saved into a PDS member, use the following appropriate command in the PDS member window:
- For SQL, use the SQL primary command
- For JCL, use the SUBMIT primary command
Correcting an SQL error and reexecuting
If the SQL statements contain an error, the results window will have an error message at the top: One or more statements executed with errors.
To correct an error in the SQL and resubmit it, simply remove the message window to view the SQL work buffer. Locate and correct the error using editing primary and row commands. Then execute the SQL once again.