Issue a DROP TABLE statement to remove a relational table from the DIV data set. Before you can delete a table, you must first delete all of the rows in the table using the DELETE FROM statement (described in the previous section). This prevents you from accidentally deleting a table that contains information that a rule or an automation procedure needs to use.
Note: You can use a host variable for tablename.
Use this syntax in an AOF rule or an OPS/REXX program:
ADDRESS SQL "DROP TABLE keywords"
{tablename}
[SYSTEM(ALL|EXT|sysnames)]
[SYSWAIT(seconds)]
[OUTPUT|NOOUTPUT]
[SYSPLEX]
Use this syntax to invoke the statement from a TSO terminal, a TSO/E REXX program, or a TSO CLIST:
OPSQL DROP TABLE
{tablename}
You may specify these operands for the DROP TABLE statement:
Defines the 1- to 18-character name of the table to be removed.
(Optional) Performs cross-system SQL operations. Specify one of these values:
Routes the SQL command to all active MSF-defined systems, including the local system.
Routes the SQL command to all remote, active MSF-defined systems.
Routes the SQL command to the specified systems. You may specify from one to eight system names as the value of sysnames.
For more information, see the chapter “Using the Relational Data Framework” in the User Guide.
(Optional) Defines the number of seconds the SQL processor waits for output from a remote system. You may specify a value between 1 and 300 seconds.
Do not specify a value for SYSWAIT if you specify the SYSTEM(ALL), SYSTEM(EXT), or NOOUTPUT keywords.
(Optional) Indicates whether the command returns output to the external data queue. Specify OUTPUT to have output returned; otherwise, specify NOOUTPUT.
NOOUTPUT is implied when:
(Optional) Reduces the scope of the SYSTEM(ALL|EXT) operand to MSF connected systems that belong to the same z/OS sysplex as the command issuer. The keyword has no effect on a list of explicit system names.
Example: Delete the SYSTEMS Table
The following two statements delete the SYSTEMS table. The first statement deletes all contents of all rows in the table. The DROP TABLE statement then deletes the empty table.
ADDRESS SQL "DELETE FROM SYSTEMS"
ADDRESS SQL "DROP TABLE SYSTEMS"
| Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |