[an error occurred while processing this directive]
HP OpenVMS Systems Documentation |
HP COBOL
|
Previous | Contents | Index |
$ DBO/REPORT |
$ DBO/EXTRACT- $_ schema-name/SUB-SCHEMAS=sub-schema-name/OUTPUT=filename - $_ /OPTION=FULL $ PRINT filename |
$ DBO/DUMP database-name/SUB-SCHEMAS=sub-schema-name/OUTPUT=filename $ PRINT filename |
Refer to the Oracle CODASYL DBMS documentation set for more information.
DB DEFAULT_SUB-SCHEMA WITHIN PARTS. |
DB PARTSS1 WITHIN PARTS FOR "DB1:[COBOL88]NEW.ROO". |
DB DEFAULT_SUB-SCHEMA WITHIN PARTS THRU "STREAM1". |
The Keeplist Description entry names a keeplist.
keeplist-name
is a user-defined name.integer
is a positive integer.
The following example defines three keeplists to navigate through the PARTSS1 subschema: KEEP-COMPONENT, K-EMPLOYEE, and KL-ID:
DB PARTSS1 WITHIN PARTS. LD KEEP-COMPONENT. LD K-EMPLOYEE. LD KL-ID. |
The Procedure Division of your COBOL database programs may contain declarative and nondeclarative procedures. These may include:
There are four types of COBOL statements:
Table 4-1 shows the three types of COBOL statements (conditional, imperative, delimited-scope) that are considered particularly relevant to database programming.
Type | Verb |
---|---|
Conditional |
COMMIT ([NOT] ON ERROR)
CONNECT ([NOT] ON ERROR) DISCONNECT ([NOT] ON ERROR) ERASE ([NOT] ON ERROR) FETCH ([NOT] AT END or [NOT] ON ERROR) FIND ([NOT] AT END or [NOT] ON ERROR) FREE ([NOT] ON ERROR) GET ([NOT] ON ERROR) KEEP ([NOT] ON ERROR) MODIFY ([NOT] ON ERROR) READY ([NOT] ON ERROR) RECONNECT ([NOT] ON ERROR) ROLLBACK ([NOT] ON ERROR) STORE ([NOT] ON ERROR) |
Imperative |
COMMIT (1)
CONNECT (1) DISCONNECT (1) ERASE (1) FETCH (2) FIND (2) FREE (1) GET (1) KEEP (1) MODIFY (1) READY (1) RECONNECT (1) ROLLBACK (1) STORE (1) |
Delimited-Scope |
COMMIT (END-COMMIT)
CONNECT (END-CONNECT) DISCONNECT (END-DISCONNECT) ERASE (END-ERASE) FETCH (END-FETCH) FIND (END-FIND) FREE (END-FREE) GET (END-GET) KEEP (END-KEEP) MODIFY (END-MODIFY) READY (END-READY) RECONNECT (END-RECONNECT) ROLLBACK (END-ROLLBACK) STORE (END-STORE) |
( 1 ) Without the optional [NOT ] ON ERROR phrase
( 2 ) Without the optional [NOT ] AT END or [NOT ] ON ERROR phrase
Like statements, COBOL sentences also can be compiler-directing, imperative, or conditional. Sentence type depends upon the types of clauses the statement contains. Table 4-2 summarizes the contents of the three types of COBOL sentences. The remaining text in this section discusses each type of statement and sentence in greater detail.
Type | Contents of Sentence |
---|---|
Imperative | One or more consecutive imperative statements ending with a period |
Conditional | One or more conditional statements, optionally preceded by an imperative statement, terminated by the separator period |
Compiler-Directing | Only one compiler-directing statement ending with a period |
Previous | Next | Contents | Index |