Creating and replacing objects

Use the CREATE and REPLACE commands (can be abbreviated to CRE and REPL) to create and replace objects in the database with the object data currently being edited.

About this task

You can only create and replace objects of the same type (SQL query or QMF procedure) from the object data currently being edited.

The confirmation prompt is not used when the objects are written to the database by using these commands.

To specify the lines that are used to create or replace the object, use:
  • Line commands C or CC or else a range operand to specify lines.
  • Line commands M or MM to specify lines that are then deleted.

The current attribute values of the edited object are written back to the database with the newly created or replaced object.

Procedure

  1. Specify the object name as a command parameter on the command line or on a prompt panel if you enter the command without a parameter.
  2. Unqualify or qualify the object name with the object owner. If the owner or the name contains special characters, they must be enclosed by double quotation marks.
  3. If there is insufficient space to enter an object name on the command line or the prompt panel, you can use the ZEXPAND command.
  4. To create an object newproc in the database, where a range of lines was properly specified:
    Command ===> create newproc
    Creates the object newproc and saves it in the database. The object owner defaults to the current authorization id.
  5. To replace the existing object old.query in the database, where a range of lines was properly specified:
    Command ===> replace "old.query"
    Replaces the object old.query in the database.

Results

Note: These commands operate ONLY on QMF objects and always copy the complete QMF object. They do NOT operate on TSO data sets or members.