Path Group Can Include Multiple Paths
A path group can include any number of paths, each of which must be preceded by at least one SELECT clause.
Commands Allowed for OBTAIN Path-Groups
Paths included in a path group for OBTAIN logical-record requests cannot include database modification commands (MODIFY, STORE, ERASE, CONNECT, DISCONNECT). OBTAIN paths can include only the following database commands:
Identifying a Database Record in a Path-Group
The path DML commands require identification of the database record to be acted upon. Specify the database record as follows:
Note: For more information about the position of logical record elements within logical records, see 15.6, "LOGICAL RECORD Statement".
Access Restrictions Apply to Logical Record Navigation
Access restrictions specified for records, sets, and areas apply to DML commands included in paths.
Terminate PATH-GROUP Statement With a Period
Each PATH-GROUP statement contains only one period, at the very end of the statement.
Logical Record Placed in Program Variable Storage
For OBTAIN and GET path DML commands, the retrieved record is placed in the program's variable storage. The record is placed in its corresponding logical-record element within the logical record named in the PATH GROUP statement. For MODIFY and STORE path DML statements, the data used to update the database is taken from this same location.
Note: In a DML program, the programmer can specify that the record be placed in and taken from an alternative variable-storage location. To do this, the programmer codes an INTO clause on the OBTAIN logical-record request and a FROM clause on the MODIFY, STORE, and ERASE logical-record requests. See the CA IDMS Navigational DML Programming Guide for details.
Coding find-obtain-index-clause can reduce I/O
When LRF encounters the find-obtain-index-clause, it looks for any reference to the set's sort control element in the WHERE clauses of both this path's command and the program request. If such a reference is found, LRF uses the index (rather than checking values in each record) to satisfy the WHERE clause criteria. Using the index usually takes fewer I/O operations than does checking each member record's sort-key value. Thus, when accessing each member of a sorted indexed set, this form of FIND/OBTAIN is preferable to another.
Default ON Clauses for Specific Path Commands
This table shows the path commands for which ON clauses are automatically generated by the subschema compiler. These ON clauses are overridden by the path definition.
|
Path Command |
Default ON Clause |
|---|---|
|
FIND/OBTAIN WHERE DBKEY FIND/OBTAIN WHERE CALCKEY FIND/OBTAIN WITHIN SET WHERE SORTKEY FIND/OBTAIN WITHIN SET USING INDEX |
ON 0000 NEXT ON 0326 ITERATE |
|
FIND/OBTAIN WITHIN SET/AREA |
ON 0000 NEXT ON 0307 ITERATE |
|
IF SET EMPTY IF SET MEMBER |
ON 0000 NEXT ON 1601 ITERATE |
|
IF NOT SET EMPTY IF NOT SET MEMBER |
ON 0000 ITERATE ON 1601 NEXT |
|
FIND/OBTAIN CURRENT FIND/OBTAIN OWNER WITHIN SET GET MODIFY STORE CONNECT DISCONNECT ERASE KEEP COMPUTE |
ON 0000 NEXT |
|
EVALUATE |
ON 0000 NEXT ON 2001 ITERATE |
On-error-clause follows if-empty/member-clause
An on-error-clause follows a if-member-clause or a if-empty-clause either explicitly, if coded by the DBA, or implicitly by the subschema compiler. The on-error-clause indicates the action to be taken based on the error-status code returned by CA IDMS/DB.
|
Copyright © 2014 CA.
All rights reserved.
|
|