Toad for DB2 on z/OS has the ability to generate and execute DB2 z/OS commands for objects. I've got Toad up and running. And I've got a list of databases here.
I'm going to right click on it and select Commands. And you can see that we offer Display, Start, and Stop. I'm going to click on Display. And it brings up a dialogue in which I could customize any options for the Display command.
I'm going to specify no limit and click Execute. And the command gets executed. And the output of the command gets displayed in this window here. So you can see I've got many tablespaces, and you can see all of them are displayed in the output here. So that's an example of a Display command for a database.
For other objects, like tablespaces, we have the same kind of offering. Display, Start, Stop. You could very quickly and easily generate a script-- Start, Stop-- a tablespace. There you go. Done that for tablespace. And then same thing for indexes. You could very easily generate a Start, Stop, Display for indexes as well.
And these require that our z/OS components be installed. Because you can't execute a DB2 z/OS command natively, like you can in SQL. So our z/OS components must be installed for this to occur.
If you select the subsystem in the database browser, on the right hand side, you'll see a Threads tab. And what we do is we actually execute, when you go that tab-- we'll actually display Threads command and we'll format the output very nicely. So you can actually see all the applications and users that are connected to your database. And from this dialogue, we also allow you the ability to cancel any threads, if you want to cancel threads. So you could very easily generate Cancel commands as well.
And we also have a Utilities tab on the right hand side of Subsystems, in which we execute the display utilities. And we show you the output of the command response below. And up on top, we give you a nicely formatted view of the utilities. And you can right click on there and terminate a utility if you want. It will bring up a script like this that you can execute. So there's some other ways in which we execute commands in Toad for DB2.
And the last way is you could actually type in any command in the SQL editor that you want. So if you're connected to DB2 z/OS subsystem, you could connect in-- for example, I have a display database, buffer pool, display utility. When I run these statements, we're going to be turning around and call on our internal stored procedure to actually do this and then get our output.
And you can see the output is nicely formatted on the bottom here. Here's the display buffer pool command output. So you can see that all these commands were successfully called. And the formatted output is displayed below for you.
And another thing that we also have is-- we might have talked about this-- but we've got some code snippets. So if you're unfamiliar with the exact syntax of commands, you could very easily use code snippets-- double click on the command, and we will show you the command syntax for a specific command. So for example, I wanted to start a procedure, that's pretty much the syntax of starting a procedure.
So as a DBA, you'll probably be wanting to execute several commands for [INAUDIBLE] your subsystem, and Toad allows you to do that.