This topic provides short examples of using CDO command
procedures. You can include any CDO commands that you can use
interactively (including the CDO DEFINE command) in a CDO command
procedure and execute it at the CDO prompt using the at sign (@).
See the CDO @_At_Sign command description for more information.
NOTE
You cannot execute the CDO EDIT command in batch mode.
1 – Examples
The following CDO command procedure, START.CDO, places you in
the [BOB.DICT] directory, then lists the definitions in that
directory. The first CDO command, SET VERIFY, instructs CDO to
display each subsequent command on the terminal screen before
execution.
SET VERIFY ! Echoes each command executed in this
! procedure at the terminal
SET DEFAULT USER$DISK:[BOB.DICT] ! Places you in the [BOB.DICT]
! directory
DIRECTORY ! Lists the definitions in the [BOB.DICT]
! directory
To execute a CDO command procedure with a default file type of
.CDO, you do not need to specify file type. The following example
shows the output of the previous START.CDO command procedure:
CDO> @START
SET DEFAULT USER$DISK:[BOB.DICT]
DIRECTORY
Directory USER$DISK:[BOB.DICT]
CDDPLUS DIRECTORY
CDO>
If you do not use the default file type of .CDO for a CDO
command procedure, you must specify the file type to execute the
command procedure. In the following example, the CDO AT_SIGN (@)
command executes the CDO commands in the CHANGE.PROCEDURE command
procedure:
CDO> @CHANGE.PROCEDURE
In the following example, the CDO$INIT.CDO initialization file
sets your default repository directory. Oracle CDD/Repository
automatically executes the initialization file when you invoke
CDO from the OpenVMS directory that contains it.
SET VERIFY !Echoes each command executed in this
!procedure at the terminal
SET DEFAULT USER$DISK:[JOHN.DICT] !Places you in the [JOHN.DICT]
!directory
DIRECTORY !Lists the dictionary definitions
!in the [JOHN.DICT] directory
The CDO$INIT.CDO file produces the following output:
SET DEFAULT USER$DISK:[JOHN.DICT]
DIRECTORY
Directory USER$DISK:[JOHN.DICT]
BACK_ORDERS;1 FIELD
CDDPLUS DIRECTORY
ORDER_NUMBER;1 FIELD
CDO>