HP OpenVMS Systems Documentation |
HP COBOL
|
Previous | Contents | Index |
Format 3
(The Technical Notes following this example explain execution of the USE procedures shown.)
PROCEDURE DIVISION. DECLARATIVES. 200-DATABASE-EXCEPTIONS SECTION. USE FOR DB-EXCEPTION ON OTHER. 201-PROCEDURE. DISPLAY "DATABASE EXCEPTION CONDITION". PERFORM 250-DISPLAY-MNEMONIC. 210-DATABASE-EXCEPTIONS SECTION. USE FOR DB-EXCEPTION ON DBM$_NOTIP. 211-PROCEDURE. DISPLAY "DATABASE EXCEPTION CONDITION ON READY STATEMENT" PERFORM 250-DISPLAY-MNEMONIC. 250-DISPLAY-MNEMONIC. * * DBM$SIGNAL displays a diagnostic message based on the * status code in DB-CONDITION. * * CALL "DBM$SIGNAL". STOP RUN. END DECLARATIVES. |
4.9.1 RETAINING Clause
The RETAINING clause specifies which currency indicators are not
updated during the execution of the COMMIT, CONNECT, FETCH, FIND,
MODIFY, RECONNECT, and STORE statements.
set-name
is a set name which is available in the program's subschema.
You can prevent currency indicator updates for REALM, RECORD, or SET. Specifying REALM retains all realm currency indicators; specifying RECORD retains all record currency indicators.
If SET is used without the set-name list option, the Database Control System (DBCS) retains the currency indicators for all sets in the subschema. If you specify the set-name list option, only the currency indicators for the specified sets are retained. The same set-name cannot be listed more than once in a given set-name list.
If you specify the RETAINING clause and do not select an option, the DBCS retains all REALM, RECORD, and SET currency indicators.
With HP COBOL database programming you can access data without designing separate files for specific applications. You accomplish this with the database management system (Oracle CODASYL DBMS) and the COBOL data manipulation language (DML). This chapter is a resource for information on:
Database programmers and readers unfamiliar with Oracle CODASYL DBMS concepts and definitions should run the online self-paced demonstration package (see Section 5.1) as a prerequisite to this chapter. The demonstration package lets you test Oracle CODASYL DBMS features and concepts as you learn them. Additional useful information can be found in:
To help you learn how to use a database, Oracle has provided you with a database called PARTS. PARTS is an online self-paced demonstration database configured to show some of the features of Oracle CODASYL DBMS. You create the PARTS database as part of the demonstration package. Examples in this chapter refer to either the PARTSS1 or PARTSS3 subschema in the PARTS database. A complete listing of the PARTS schema, including the PARTSS1 and PARTSS3 subschemas, can be found in the Oracle CODASYL DBMS documentation on data manipulation.
Before beginning the demonstration, you should do the following:
$ RUN SYS$SYSTEM:DMU[RET] DMU> CREATE nodename[RET] DMU> SHOW DEFAULT[RET] defaultname DMU> EXIT[RET] $ |
nodename | names the new node in the CDD to contain your personal PARTS database. |
defaultname | is your CDD default. |
$ RUN SYS$SYSTEM:DMU[RET] DMU> CREATE DEMONODE[RET] DMU> SHOW DEFAULT[RET] CDD$TOP DMU> EXIT[RET] $ |
As of Version 7.0, DBMS ships a kit that allows you to choose either a standard or multi-version DBMS environment.
The multi-version environment is the same as the standard environment, except that it allows multiple versions of DBMS to exist concurrently on the same system. This is implemented by adding the major and minor version number to the image file names, the command procedures that exist in common locations, and the [.DBM] subdirectory located in SYS$COMMON:[SYSTEST].
To run the demonstration package after a standard installation, (of any version of DBMS) issue the following command:
$ @SYS$COMMON:[SYSTEST.DBM]DBMDEMO [RET] |
To run the demonstration package after a multi-version installation, issue the following command:
$ @SYS$COMMON:[SYSTEST.DBMnn]DBMDEMO [RET] |
where nn is the DBMS major and minor version.
For example, to run the demonstration package on OpenVMS I64 with DBMS Version 7.2, issue the following command:
$ @SYS$COMMON:[SYSTEST.DBM72]DBMDEMO [RET] |
You must run the entire demonstration to create and load the PARTS database. If you have already created the PARTS database but are unsure of or have changed its contents, you can reload it by running option 11 of the self-paced demonstration package. The demonstration package creates the NEW.ROO database instance. If you have any problems with the demonstration package, see your system manager or database administrator.
Previous | Next | Contents | Index |