|
HP COBOL Reference Manual
Technical Note
- READ statement execution can result in these FILE STATUS data item
values:
File Status |
File Organization |
Access Method |
Meaning |
00
|
All
|
All
|
Read is successful; record is available; lock acquired as requested
|
02
|
Ind
|
All
|
Read is successful; duplicate key detected
|
04
|
All
|
All
|
Record read larger or smaller than record area
|
10
|
All
|
Seq
|
No next logical record (at end), optional file not present (at end), or
no valid next record (at end)
|
14
|
Rel
|
Seq
|
Relative record number too large for relative key data item (at end)
|
23
|
Ind, Rel
|
Rand
|
Record not in file (invalid key) or optional file not present (invalid
key)
|
46
|
All
|
Seq
|
No valid next record
|
47
|
All
|
All
|
File not open, or incompatible open mode
|
90
|
All
|
All
|
Record locked by another user; record is available in record area; no
lock is acquired (soft lock for Hewlett-Packard standard locking only)
|
92
|
All
|
All
|
Record locked by another user; record is not available; no lock is
acquired (hard lock)
|
30
|
All
|
All
|
All other permanent errors
|
- On Alpha and I64 systems, use START before initiating a sequence of
either READ NEXT statements or READ PRIOR/READ PREVIOUS statements. You
should use START, if you switch between READ NEXT and READ PRIOR/READ
PREVIOUS or vice versa.
- On Alpha and I64 systems, the order of duplicate key values for a
descending key is not necessarily the same as the order of duplicate
key values for READ PRIOR/READ PREVIOUS used with an ascending key
defined as the same file record location as the descending key.
Additional References
- LOCK MODE clause in the Section 4.2.1, FILE_CONTROL paragraph in Chapter 4
- Section 4.2.10, I-O-CONTROL paragraph in Chapter 4
- Section 6.1.4, Scope of Statements
- Section 6.6.8, I-O Status
- Section 6.6.10, INVALID KEY Phrase
- Section 6.6.9, AT END Phrase
- Section 6.6.12, INTO Phrase
- Section 6.8.24, OPEN statement
- Section 6.8.40, UNLOCK statement
- Section 6.8.42, USE statement
6.8.27 RECORD
Function
The RECORD statement creates an Oracle CDD/Repository dependency relationship
between an HP COBOL program and the Oracle CDD/Repository entity referred
to by the RECORD statement.
path-name
is a partial or complete Oracle CDD/Repository path name. It specifies a
dictionary entity in CDO format.
relation-type
is a valid Oracle CDD/Repository protocol. It specifies the type of
relationship to be created between the HP COBOL program and the
CDO dictionary entity specified in the path name. The default
relationship type is CDD$COMPILED_DEPENDS_ON.
Syntax Rules
- A space must precede the word RECORD.
- The RECORD statement must be terminated by the separator period.
General Rules
- path-name refers to the Oracle CDD/Repository path for a
dictionary entity. The entity must be in CDO format.
- The RECORD statement creates an Oracle CDD/Repository relationship between
the HP COBOL program through a compiled module entity (see
Technical Notes) and the dictionary entity specified in the path name.
This relationship information is then stored in Oracle CDD/Repository.
- The RECORD statement is ignored unless the /DEPENDENCY_DATA
compiler option is specified.
- If the RECORD statement is in a contained program, the relationship
created is between the outermost containing program and the entity
specified in the path name.
Technical Notes
- The path-name can be a nonnumeric literal or COBOL word
formed according to the rules for user-defined names. It represents a
complete or partial Oracle CDD/Repository path name specifying an Oracle CDD/Repository
entity. If path-name is not a literal, the compiler translates
hyphens in the COBOL word to underscore characters.
The resultant
path name must conform to all rules for forming Oracle CDD/Repository path
names.
- The relation-type can be a nonnumeric literal or COBOL
word formed according to the rules for user-defined names. It must be a
valid Oracle CDD/Repository protocol type. For example:
- CDD$COMPILED_DEPENDS_ON is an example of a COBOL word that is a
valid Oracle CDD/Repository protocol type.
- "CDD$COMPILED_DERIVED_FROM" is an example of a nonnumeric literal
that is also a valid Oracle CDD/Repository protocol type.
- The RECORD statement creates a relationship between an
Oracle CDD/Repository compiled module dictionary entity and the dictionary
entity specified in the path name. A compiled module entity is
automatically created and stored in Oracle CDD/Repository when the
/DEPENDENCY_DATA compiler option is specified. The name of the compiled
module entity is the program-name from the PROGRAM-ID
paragraph, with hyphens translated to underscores.
Additional References
- The description of Oracle CDD/Repository in the HP COBOL User Manual
- Oracle CDD/Repository Documentation Set <>
6.8.28 RELEASE
Function
The RELEASE statement transfers records to the initial phase of a sort
operation.
rec
is the name of a logical record in a sort-merge file description (SD)
entry. It can be qualified.
src-area
is the identifier of the data item that contains the data.
Syntax Rules
- A RELEASE statement can be used only in an input procedure in the
same program as the SORT verb. The input procedure must be associated
with a SORT statement for the sort or merge file that contains
rec.
- If src-area is a function-identifier, it must reference an
alphanumeric function. When src-area is not a
function-identifier, rec and src-area must not
reference the same storage area.
General Rules
- See the FROM Phrase section for a list of rules.
- The RELEASE statement transfers the contents of rec to the
first phase of the sort.
- After the RELEASE statement executes, the record is no longer
available in rec unless the associated sort or merge file-name
is in a SAME RECORD AREA clause. In that case, the record is available
to the program as a record of the sort-merge file-name. It is also
available as a record of all other file-names in the same SAME RECORD
AREA clause.
Additional References
6.8.29 RETURN
Function
The RETURN statement obtains sorted records from a sort operation. It
also returns merged records in a merge operation.
smrg-file
is the name of a file described in a sort-merge file description (SD)
entry.
dest-area
is the identifier of the data item to which the returned
smrg-file record is moved.
stment
is an imperative statement executed for an at end condition.
stment2
is an imperative statement executed for a not at end condition.
Syntax Rules
- A RETURN statement can be used only in an output procedure in the
same program as the SORT verb. The output procedure must be associated
with a SORT or MERGE statement for smrg-file.
- The storage area associated with dest-area and the record
area associated with smrg-file cannot be the same storage area.
General Rules
- See the INTO Phrase section for a list of rules.
- When more than one record description describes the logical records
for smrg-file, the records share the same storage area. The
contents of storage positions beyond the range of the returned record
are undefined when the RETURN statement ends.
- Before the output procedure executes, the File Position Indicator
is updated. It points to the record whose key values make it first in
the file. If there are no records, the File Position Indicator
indicates the at end condition.
- The RETURN statement makes the next record (pointed to by the File
Position Indicator) available in the record area for smrg-file.
- The File Position Indicator is updated to point to the next record
in smrg-file. The key values in the SORT or MERGE statement
determine the next record.
- If smrg-file has no next record, the File Position
Indicator is updated to indicate the at end condition.
- If the File Position Indicator indicates the at end condition when
the RETURN statement executes, stment executes and control is
transferred to the end of the RETURN statement. If the NOT AT END
phrase is specified, it is ignored. The contents of the smrg-file
record areas are undefined.
- If the File Position Indicator does not indicate an at end
condition when the RETURN statement executes, after the record is made
available and after executing any implicit move resulting from the
presence of an INTO phrase, control is transferred to stment2,
if specified. Otherwise, control is transferred to the end of the
RETURN statement.
- When the at end condition occurs:
- RETURN statement execution is unsuccessful.
- The File Position Indicator is not changed.
- See the Scope of Statements section for a description of scope
terminators such as END-RETURN.
|