Previous Topic: SyntaxNext Topic: Usage


Parameters

PATh-group name is ERAse logical-record-name

Specifies an ERASE path-group for which the subsequent path definitions are available to service program requests. Logical-record-name must be the name of a logical record defined for the current subschema.

PATh-group name is MODify logical-record-name

Specifies a MODIFY path-group for which the subsequent path definitions are available to service program requests. Logical-record-name must be the name of a logical record defined for the current subschema.

PATh-group name is OBTain logical-record-name

Specifies an OBTAIN path-group for which the subsequent path definitions are available to service program requests. Logical-record-name must be the name of a logical record defined for the current subschema.

PATh-group name is STOre logical-record-name

Specifies a STORE path-group for which the subsequent path definitions are available to service program requests. Logical-record-name must be the name of a logical record defined for the current subschema.

select-clause

Delimits paths within a path group. Thus, at least one SELECT clause must precede the database commands that constitute a path definition.

Multiple paths can be defined for a single path group; LRF executes only one path per program request. LRF chooses that path based on the selectors coded in the FOR options of the multiple SELECT clauses. The first SELECT clause whose selectors match those of the program request is the path that LRF executes.

USIng INDex indexed-set-name

Identifies the indexed set (if any) that LRF uses when executing a database command specified using the find-obtain-index-clause (described later). Indexed-set-name must be a sorted indexed set included in the current subschema. When coded, the USING INDEX clause must precede the FOR clause(s) of the SELECT clause.

for

Identifies selectors to be used as the basis of path selection to service logical-record requests. For a path to be chosen, the WHERE clause of the program DML request must supply information that matches all selectors specified in any one of the path's SELECT clauses.

A SELECT clause can contain any number of selectors, including zero. A SELECT clause with no selectors will always cause the path to be selected. Four types of selectors can be included in the SELECT clause, in any combination: KEYWORD, FIELDNAME-EQ, FIELDNAME, and ELEMENT.

ELement lr-element-name

Specifies that the WHERE clause of a request to be serviced by the path must reference a field in the named logical-record element (database record) in any manner.

FIEldname lr-field

Specifies that a request to be serviced by the path must reference the named logical-record field (in any manner).

The optional qualifier OF lr-element-name names the logical-record element that contains the logical-record field. This qualifier is required if lr-field-name is not unique within the subschema.

Note: Expanded syntax for lr-field is presented in Chapter 13, “Parameter Expansions”.

FIELDNAME-EQ lr-field

Specifies that the WHERE clause of a request to be serviced by the path must reference the named logical-record field in a logically conjunctive single-value equality comparison. For example, LRF will service the following requests:

where fieldname eq 123
where fieldname eq 123 and ...

The following requests will not be serviced:

where lr-field-name eq 12 / 3
where lr-field-name eq 123 or ...

The optional qualifier OF lr-element-name names the logical-record element that contains the logical-record field. This qualifier is required if lr-field-name is not unique within the subschema. FIELDNAME-EQ selectors are intended for paths that utilize CALCKEY, SORTKEY, or DBKEY access. Therefore, the named field is usually qualified with an OF REQUEST clause in a path DML statement, but not in the SELECT statement

Note: Expanded syntax for lr-field is presented in Chapter 13, “Parameter Expansions”.

KEYword keyword

Specifies that the WHERE clause of a request to be serviced by the path must include the named keyword in an affirmative and logically conjunctive manner. For example, LRF will service the following types of requests:

where keyword
where keyword and ...

The following types of requests will not be serviced:

where not keyword
where keyword or ...
compute-clause

Sets the value of the left operand (lr-field-name) to equal the value represented by the right operand. Note that all named fields used with COMPUTE must be fields within the logical record named in the PATH-GROUP statement.

lr-field OF LR

In the left operand, lr-field names the receiving data field. If logical-record-field-name occurs more than once within the logical record, it must be qualified by OF lr-element-name. Lr-element-name must identify the logical-record element containing the data field, as follows:

Note: Expanded syntax for lr-field is presented in Chapter 13, “Parameter Expansions”.

'character-string-literal'

Specifies an alphanumeric literal enclosed in single quotes.

numeric-literal

Specifies a numeric literal as the right operand. A minus sign (-) can precede the numeric literal.

arithmetic-expression

Specifies either a simple arithmetic expression (containing only 1 operator) or a compound arithmetic expression (containing multiple operators). Arithmetic operators permitted in an arithmetic expression are +, -, *, and /. Operands can be numeric literals (without quotes) and logical-record field names.

lr-field OF LR

In the right operand, specifies a data field that participates in the current logical record. Rules for qualifying this name are the same as those for qualifying the left operand.

connect-clause

Establishes the current occurrence of the named database record as a member of the current occurrence of the named set.

database-record-name

Names the type of record to be connected. Database-record-name must be included in the current subschema.

set-name

Names the set to which the database record will be connected. Set-name must be included in the current subschema.

disconnect-clause

Disconnects the current occurrence of the named database record from the current occurrence of the named set.

database-record-name

Names the type of record to be disconnected. Database-record-name must be included in the current subschema.

set-name

Names the set from which the database record will be disconnected. Set-name must be included in the current subschema.

erase-clause

Erases the current occurrence of the named database record.

database-record-name

Specifies the type of record to be erased. Database-record-name must be included in the current subschema.

PERmanent MEMbers

Erases the specified record and its mandatory set members. Optional member records are disconnected but not erased. All erased mandatory members that, in turn, own set occurrences are treated as if ERASE PERMANENT commands had been issued for those erased records (that is, all mandatory members of the erased records' sets are also erased). This process continues through the database structure until all mandatory records in the sequence have been treated.

SELECTIVE MEMbers

Erases the specified record and its mandatory set members. Optional member records are erased only if they do not currently participate as members in other set occurrences. All erased records that, in turn, own set occurrences are treated as if ERASE SELECTIVE commands had been issued for those erased records.

ALL MEMbers

Erases the specified record and all of its mandatory and optional set members. All erased records that, in turn, own set occurrences are treated as if ERASE ALL commands had been issued for those erased records.

evaluate-clause

Determines whether the specified boolean expression is true or false, allowing specific PATH-GROUP logic to be performed based on the outcome of the evaluation.

If the expression is true, CA IDMS/DB returns an error status of 0000. If the expression is false, CA IDMS/DB returns an error status of 2001. The error status can be checked with the ON clause, thus allowing conditional processing. Use of EVALUATE implies ON 0000 NEXT and ON 2001 ITERATE.

boolean-expression

Specifies a boolean expression. In EVALUATE, comparisons within the boolean expression must specify logical-record-field-name OF LR.

Note: Expanded syntax for boolean-expression is presented in Chapter 13, “Parameter Expansions”.

find-obtain-calckey-clause

Specifies that a database record is to be located or obtained by means of its CALC key.

FINd

Finds (locates) the named database record.

OBTain

Finds (locates) and obtains the named database record.

KEEp

Places a shared lock on the record occurrence.

EXClusive

Places an exclusive lock on the record occurrence.

FIRst

Specifies that the first record occurrence encountered containing the indicated CALC-key value is to be accessed. FIRST is the default.

NEXt

Specifies that a record occurrence containing the same CALC-key value as the current record of the specified record type is to be accessed. NEXT assumes previous retrieval of a record containing the specified CALC-key value and accesses a record containing a duplicate CALC key.

EACh

Specifies that each record containing the indicated CALC-key value is to be accessed. EACH indicates that this FIND/OBTAIN command can be iterated.

Every time the command is iterated, LRF retrieves another occurrence of the named record that contains the specified CALC key. This iteration permits LRF to access all records that contain that CALC key.

database-record-name

Specifies the type of record to be accessed. Database-record-name must be a record whose location mode is CALC.

WHEre CALCkey EQ/IS/=

Specifies the CALC-key value to be used when accessing the database record.

'character-string-literal'

Specifies an alphanumeric literal enclosed in single quotes.

numeric-literal

Specifies a numeric value to be used as the CALC key.

arithmetic-expression

Specifies an arithmetic expression whose result is to be used as the CALC key. The expression can be designated as a simple arithmetic operation or as a compound arithmetic operation. Arithmetic operators permitted in an arithmetic expression are +, -, *, and /. Operands can be literals, logical-record fields, or database fields.

lr-field

Specifies that the CALC-key value to be used is in the named logical-record field. If the database record's CALC key is made up of noncontiguous fields, logical-record-field-name must be the same size as the total length of all fields in the CALC key. To accomplish this, define an IDD record type that contains logical-record-field-name and name the IDD record as an element of the logical record.

Note: Expanded syntax for lr-field is presented in Chapter 13, “Parameter Expansions”.

OF LR

Specifies that the CALC-key value to be used is in the named logical-record field in program variable storage. The path DML statement must initialize the field to the appropriate value before the FIND/OBTAIN request is issued. Note that LRF uses the contents of the named field, even if the request's WHERE clause also specifies a CALC-key value.

OF REQUEST

Specifies that the CALC-key value is passed in the request's WHERE clause. Logical-record-field-name is equated in the WHERE clause to a literal value, a program variable, or the value of a logical-record field. Note that if OF REQUEST is specified, logical-record-field-name should also be named in a SELECT FOR FIELDNAME-EQ clause in the path containing this FIND/OBTAIN command.

AND boolean-expression

Specifies boolean selection criteria that further identify the database record occurrence to be accessed.

Note: Expanded syntax for boolean-expression is presented in Chapter 13, “Parameter Expansions”.

find-obtain-current-clause

Specifies that the database record that is current of the named record type, set, or area is to be located or obtained.

FINd

Finds (locates) the named database record.

OBTain

Finds (locates) and obtains the named database record.

KEEp

Places a shared lock on the record occurrence.

EXClusive

Places an exclusive lock on the record occurrence.

database-record-name

Specifies the type of record to be accessed. Database-record-name must be included in the current subschema.

WIThin set-name

Specifies the database record occurrence that is current of the named set. Set-name must be included in the current subschema.

WIThin area-name

Specifies the database record occurrence that is current of the named area. Area-name must be included in the current subschema.

WHEre boolean-expression

Specifies boolean selection criteria that further identify the database record occurrence to be accessed.

Note: Expanded syntax for boolean-expression is presented in Chapter 13, “Parameter Expansions”.

find-obtain-dbkey-clause

Specifies that a database record is to be located or obtained by means of its db-key.

FINd

Finds (locates) the named database record.

OBTain

Finds (locates) and obtains the named database record.

KEEp

Places a shared lock on the record occurrence.

EXClusive

Places an exclusive lock on the record occurrence.

database-record-name

Specifies the type of record to be accessed.

number-literal

Specifies a literal value to be used as the db-key. Numeric-literal must be a 1- to 10-digit unsigned numeric value.

arithmetic-expression

Specifies an arithmetic expression whose result is to be used as the db-key. The expression can be designated as a simple arithmetic operation or as a compound arithmetic operation. Arithmetic operators permitted in an arithmetic expression are +, -, *, and /. Operands can be a literal, logical-record field, and database field.

lr-field

Specifies that the value in the named field is to be used as the db-key. Logical-record-field-name must be a full binary field or a 4-byte packed (COMP-3) field.

Note: Expanded syntax for lr-field is presented in Chapter 13, “Parameter Expansions”.

OF LR

Specifies that the db-key value to be used is in the named logical-record field in program variable storage. The path DML statement must initialize the field to the appropriate value before the FIND/OBTAIN request is issued. The value of the named field is a fullword binary value; if the field is a packed data field, CA IDMS/DB converts its value to binary. Note that LRF uses the contents of the named field, even if the request's WHERE clause also specifies a db-key value.

OF REQUEST

Specifies that the db-key value is passed in the request's WHERE clause. Logical-record-field-name is equated in the WHERE clause to a literal value, to a fullword binary field, or to a logical-record field that contains a fullword binary value (if the field is a packed data field, CA IDMS/DB converts its value to binary). Note that if OF REQUEST is specified, logical-record-field-name should also be named in a SELECT FOR FIELDNAME-EQ clause in the path containing this FIND/OBTAIN command.

AND boolean-expression

Specifies boolean selection criteria that further identify the database record occurrence to be accessed.

Note: Expanded syntax for boolean-expression is presented in Chapter 13, “Parameter Expansions”.

find-obtain-index-clause

Specifies that a database record is to be located or obtained on the basis of its membership within a sorted indexed set.

FINd

Finds (locates) the named database record. In this clause, FIND searches the index and thus does not establish currency for database-record-name. To establish such currency, use OBTAIN.

OBTain

Finds (locates) and obtains the named database record.

KEEp

Places a shared lock on the record occurrence.

EXClusive

Places an exclusive lock on the record occurrence.

EACh database-record-name

Specifies that each member of the indexed set is to be accessed.

EACH specifies that each member of the indexed set is to be accessed. EACH indicates that this FIND/OBTAIN command can be iterated. Every time the command is iterated, LRF retrieves another occurrence of the named record via the index. This iteration permits LRF to access all records in the indexed set.

Database-record-name specifies the type of record to be accessed. It must name a record defined as a member of the named set.

USIng INDex

Indicates that the set used for retrieval is the set named in the USING INDEX clause of the SELECT clause that caused the path to be selected. That is, the set name coded in the SELECT clause replaces the word INDEX when LRF interprets the DML command.

In the following example, a program request that includes a reference to EMP-NAME causes LRF to interpret the path DML command as OBTAIN EACH EMPLOYEE USING IND-EMP-NAME. A program request that includes a reference to EMP-ZIP-CODE causes LRF to interpret the command as OBTAIN EACH EMPLOYEE USING IND-EMP-ZIP-CODE.

add path-group name is obtain lr-employee
    select using index ind-emp-name
           for fieldname emp-name
    select using index ind-emp-zip-code
           for fieldname emp-zip-code
    obtain each employee using index.
USIng indexed-set-name

Identifies the name of a sorted indexed set to which database-record-name belongs. Indexed-set-name must be included in the current subschema. This option must be used if the path's SELECT clause does not include USING INDEX for the set.

WHEre boolean-expression

Specifies boolean selection criteria that further identify the database record occurrence to be accessed. If the WHERE clause contains any reference to the indexed set's sort control element, LRF uses the index (rather than checking values in each record) to satisfy the WHERE clause criteria.

Note: Expanded syntax for boolean-expression is presented in Chapter 13, “Parameter Expansions”.

find-obtain-owner-clause

Specifies that the owner of the current occurrence of the named set is to be located or obtained.

FINd

Finds (locates) the named database record.

OBTain

Finds (locates) and obtains the named database record.

KEEp

Places a shared lock on the record occurrence.

EXClusive

Places an exclusive lock on the record occurrence.

OWNer database-record-name

Identifies the occurrence (role) of the set's owner as a record within the subschema. Database-record-name need not be coded if the owner record is specified only once in the LOGICAL RECORD statement.

WIThin set-name

Specifies the set owned by the database record. Set-name must be included in the current subschema.

Note: If the set membership option for the named set is not mandatory automatic, the path should test for set membership before issuing this command.

WHEre boolean-expression

Specifies boolean selection criteria that further identify the database record occurrence to be accessed.

Note: Expanded syntax for boolean-expression is presented in Chapter 13, “Parameter Expansions”.

find-obtain-set-or-area-clause

Specifies that a database record is to be located or obtained on the basis of its logical location with a set or its physical location within an area.

FINd

Finds (locates) the named database record.

OBTain

Finds (locates) and obtains the named database record.

KEEp

Places a shared lock on the record occurrence.

EXClusive

Places an exclusive lock on the record occurrence.

FIRst

Specifies that the first record in the named set or area is to be accessed.

LASt

Specifies that the last record in the named set or area is to be accessed.

NEXt

Specifies that the next record in the named set or area is to be accessed. NEXT assumes that currency has been established in the named set or area and accesses the next record in relation to the record previously accessed in the set or area by either program request or path command.

PRIor

Specifies that the prior record in the named set or area is to be accessed. PRIOR assumes that currency has been established in the named set or area and accesses the prior record in relation to the record previously accessed in the set or area by either program request or path command.

EACh

Specifies that each record in the named set or area is to be accessed, beginning with the first record occurrence in the set or area. EACH indicates that this FIND/OBTAIN command can be iterated.

Each time the command is iterated, the next record occurrence is accessed in the set or area, based on the currency established by the previous execution of the command. This iteration permits LRF to walk the named set or sweep the named area.

EACH PRIor

Specifies that each prior record occurrence in the set or area is to be accessed, beginning with the last record occurrence in the set or area. EACH PRIOR indicates that this FIND/OBTAIN command can be iterated.

Each time the command is iterated, the prior record occurrence in the set or area is accessed, based on the currency established by the previous execution of the command. This iteration permits LRF to walk the named set or sweep the named area in a prior direction.

database-record-name

Specifies the type of record to be accessed. Database-record-name must be included in the current subschema.

WIThin set-name

Specifies a database record occurrence that is defined to the named set. Set-name must be included in the current subschema.

WIThin area-name

Specifies a database record occurrence that is defined to the named area. Area-name must be included in the current subschema.

WHEre boolean-expression

Specifies boolean selection criteria that further identify the database record occurrence to be accessed.

Note: Expanded syntax for boolean-expression is presented in Chapter 13, “Parameter Expansions”.

find-obtain-sortkey-clause

Specifies that a database record in a sorted set is to be accessed on the basis of its sort-key value.

FINd

Finds (locates) the named database record.

OBTain

Finds (locates) and obtains the named database record.

KEEp

Places a shared lock on the record occurrence.

EXClusive

Places an exclusive lock on the record occurrence.

FIRst

Specifies that the first record occurrence encountered containing the indicated sort-key value is to be accessed. FIRST is the default.

EACh

Specifies that each record containing the indicated sort-key value is to be accessed. EACH indicates that this FIND/OBTAIN command can be iterated.

Every time the command is iterated, LRF retrieves another occurrence of the named record that contains the specified sort key. This iteration permits LRF to access all records that contain that sort key.

database-record-name

Specifies the type of record to be accessed. Database-record-name must be defined as a member of the named set.

WIThin set-name

Specifies the set of which database-record-name is a member. Set-name must be included in the current subschema.

WHEre SORtkey EQ/IS/=

Specifies the sort-key value to be used when accessing the database record.

'character-string-literal'

Specifies an alphanumeric literal enclosed in single quotes.

numeric-literal

Specifies a numeric value to be used as the sort key.

arithmetic-expression

Specifies an arithmetic expression whose result is to be used as the sort key. The expression can be designated as a simple arithmetic operation or as a compound arithmetic operation. Arithmetic operators permitted in an arithmetic expression are +, -, *, and /. Operands can be literals, logical-record fields, or database fields.

lr-field

Specifies that the sort-key value to be used is in the named logical-record field. If the sort key is made up of noncontiguous fields, logical-record-field-name must be the same size as the total length of all fields in the sort key. To accomplish this, define an IDD record type that contains logical-record-field-name and name the IDD record as an element of the logical record.

Note: Expanded syntax for lr-field is presented in Chapter 13, “Parameter Expansions”.

OF LR

Specifies that the sort-key value to be used is in the named logical-record field in program variable storage. The path DML statement must initialize the field to the appropriate value before the FIND/OBTAIN request is issued. Note that LRF uses the contents of the named field, even if the request's WHERE clause also specifies a sort-key value.

OF REQUEST

Specifies that the sort-key value is passed in the request's WHERE clause. Logical-record-field-name is equated in the WHERE clause to a literal value, a program variable, or the value of a logical-record field. Note that if OF REQUEST is specified, logical-record-field-name should also be named in a SELECT FOR FIELDNAME-EQ clause in the path containing this FIND/OBTAIN command.

AND boolean-expression

Specifies boolean selection criteria that further identify the database record occurrence to be accessed.

Note: Expanded syntax for boolean-expression is presented in Chapter 13, “Parameter Expansions”.

get-clause

Moves the located occurrence of the named database record to the corresponding logical-record element in the variable-storage location assigned to the logical record named in the PATH-GROUP NAME clause.

database-record-name

Specifies the type of record to be moved. Database-record-name must be included as a logical-record element.

if-empty-clause

Tests the current occurrence of the named set to determine whether it contains any member record occurrences. If the set does not contain members, the error status is set to 0000; otherwise the error status is set to 1601.

set-name

Specifies the name of the set to be tested. Set-name must be included in the current subschema.

NOT

Reverses the default ON conditions for the IF SET EMPTY command. Refer to "Usage" for specific path commands using default ON clauses.

if-member-clause

Tests the record that is current of run unit to determine whether it participates as a member of any occurrence of the named set.

If the record is a member of the set, the error status is set to 0000; otherwise, the error status is set to 1601. Refer to "Usage" for specific path commands using default ON clauses.

NOT

Reverses the default ON conditions for the IF SET MEMBER command.

set-name

Names the set on which the member test is to be performed. Evaluates to true if the current record of run unit does participate as a member of any occurrence of the named set. Set-name must be included in the current subschema.

keep-clause

Places a shared or exclusive lock on the record occurrence that is current of the named record type, set, or area.

KEEp CURrent

Places a shared lock or the current record occurrence.

KEEp EXClusive CURrent

Places an exclusive lock or the current record occurrence.

database-record-name

Places the lock on the current occurrence of the named database record type. Database-record-name must be included in the current subschema.

WIThin set-name

Places the lock on the current occurrence of the named set. Set-name must be included in the current subschema.

WIThin area-name

Places the lock on the current occurrence of the named area. Area-name must be included in the current subschema.

modify-clause

Modifies the named database record by using data present in the variable-storage location assigned to the logical record. The requesting program must initialize variable storage to the appropriate value before LRF executes this path command.

database-record-name

Identifies a logical-record element of the logical record named in the PATH-GROUP statement.

on-error-clause

Specifies the action to be taken in the event that CA IDMS/DB returns the error status indicated by idms-error-status. This path command can be used to override the default ON clauses generated automatically by the subschema compiler as shown in the "Usage" topic.

idms-error-status

Specifies a 4-digit value of which the first two digits represent the CA IDMS/DB major error code and the last two digits represent the minor error code value.

Note: For more information about CA IDMS/DB runtime error-status codes, see the CA IDMS Navigational DML Programming Guide.

DO nested-block END

Specifies that a nested block of path commands following this ON command is to be executed. The keyword END is required at the termination of the nested block. The block of commands included with an ON DO command can itself include ON DO statements; up to 32 levels of nested blocks are permitted.

ITErate

Specifies that the most recent successfully executed path command containing an EACH clause is to be reexecuted. See the table under "Usage" in this section for a list of the ON ITERATE clauses generated automatically by the subschema compiler.

NEXt

Specifies that if CA IDMS/DB returns idms-error-status, the next command in the path is to be executed. The subschema compiler automatically generates an ON 0000 NEXT command for every path command (with the exception of IF NOT EMPTY and IF NOT MEMBER, for which it generates ON 1601 NEXT).

RETurn path-status

Specifies that LRF is to interrupt path processing and return path-status to the requesting program. (An LR-NOT-FOUND path status terminates path processing.) Path-status must be a 1- to 16-character alphanumeric string, without enclosing quotes.

CLEar RETurn path-status

Specifies that the contents of the logical record in program variable storage are to be cleared to low values. If CLEAR is not specified, LRF will return partial logical records.

store-clause

Stores a new occurrence of the named database record by using data present in the variable-storage location assigned to the logical record. The requesting program must initialize variable storage to the appropriate value before LRF executes this path command.

database-record-name

Identifies a logical-record element of the logical record named in the PATH-GROUP statement.

DETails

Display and punches the entire path group description.

ALL

Display and punches the entire path group description.

NONe

Display and punches only the name of the path group.