Toad for Db2 - Editing of PDS-member on a z/OS subsystem

With the last release of Toad for Db2, a new capability was introduced. The user can now edit any PDS member on the host in the SQL editor of Toad: simply open an existing member and load it into the editor.

For a longer time you could already upload scripts with SQL statements (in particular DDL statements from advanced alter or compare) or Db2 utilities via the remote job execution feature in Toad as a PDS member. As you can imagine, there might to be reasons to change something in the script. It is desirable that this could be done also with Toad, benefiting from the powerful features in Toad's SQL Editor.

A typical example is to prepare SQL/DDL in the editor, save it to a PDS member and then run it in SPUFI, or converse, create or edit create SQL/DDL in a PDS member and then bring it into Toad to run it.

With Toad for Db2 version 6.5 two new icons have appeared in the toolbar of the SQL Editor, open SQL script from a PDS member and save SQL Script to a PDS member:

The first step to start editing a SQL script is to specify the target subsystem:

 

After this is done, we need to specify the PDS member itself which we want to edit, click on the query icon in the member name section. An ftp connection (or sftp connection if desired) will be established to query the partitioned data set:

 

After this is done, the PDS will be queried and we can see the list of all its members:

 

We can select a single member by clicking its name and clicking "OK". Then we will get back to the previous dialogue, and we see that the name of the selected member name is put in. We can now open it in the editor via clicking "Load Script":

 

The script is now opened in the editor. 

 

As you can see, the script contains a JCL jobcard with a little SQL statement. Toad's editor is especially built for writing SQL, the JCL code would be marked as wrong during Toad's automatic syntax check since it is not valid SQL. In order to avoid this, you can turn off the automatic syntax check feature in Toad in the options:

 

Once you have done your changes in the script or JCL, you can easily save it by clicking the following icon, then you either replace the old member or you can save it as a new member.

Anonymous