Purpose
Uniquely identifies a field name.
Syntax
►►── data-item-name ─┬─────────────────────────────────────────────────────┬─► └ ( ┬ file-record-name ──────────────────┬┬───────┬ ) ┘ ├ KEYFILE ───────────────────────────┤└ level ┘ │ database-record-name ──────────────┤ └┬─────────────────────────┬ lr-name ┘ └ database-record-name OF ┘ ►─┬──────────────────────────┬───────────────────────────────────────────────►◄ ├─ .subscript-value ───────┤ └─ .field-name-expression ─┘
Syntax Rules
Syntax rules follow:
Is the name of a field in a file defined to the data dictionary, a file characterized on the KEYFILE parameter, a database record, a logical record, or a table.
Is the name of a record defined to the data dictionary. The record must belong to the file named on the FN= keyword expression of an INPUT or KEYFILE parameter.
Specifies that the field is associated with the key file defined on the KEYFILE parameter.
Specifies the name of a database record that appears on a PATH parameter.
In a run that accesses a view of a table, database-record-name specifies the name of the record that defines a source table in the view definition. Database-record-name is always RFUR-nnnnnn-DATA, where nnnnnn is the table definition number (TDN) generated when the table was defined.
To determine the table definition number, check either of the following:
Specifies the name of the logical record on the PATH parameter.
If the field is defined to two or more records within one logical record, the field must be qualified by database-record-name OF logical-record-name. For example, EMP-ID (EMPLOYEE OF EMP-JOB-LR) references the EMP-ID field in the EMPLOYEE record of the logical record.
In a run that accesses a view of a table, logical-record-name is the logical record name of the table view. To determine the logical record name, check either:
If one of these qualifiers is specified, it must be enclosed in parentheses.
Specifies an occurrence of the field in the input buffer. Level is a value in the range 1 through 256; the default is 1. If specified, level must be separated from the name of the record or file (if any) by a comma or a space and must precede a closing parenthesis. Level is determined as follows:
Specifies a numeric literal that identifies a specific occurrence of a multiply-occurring field; for example, EMP-NAME.4 identifies the fourth occurrence of EMP-NAME.
If a subscript value is provided, it must be separated from the name of the multiply-occurring field by a period (.). The value of the subscript should be an integer in the range 1 through n, where n is the number of repetitions of the multiply-occurring field.
For example if EMP-NAME occurs ten times, the value of the subscript should not exceed 10. The value of the subscript can be tested in procedure logic.
Specifies the name of a singly-occurring numeric input or work field whose value identifies a specific occurrence of a multiply-occurring field; for example, if INDX has a value of 2, then EMP-NAME.INDX identifies the second occurrence of EMP-NAME. The subscript field definition must not specify a decimal point.
For more information on field-name-expression, see User-Defined Variables.
Examples
The following examples of CA Culprit parameters illustrate the use of both reserved keywords and record and level qualifiers.
Example 1: Using PATH-ID in Procedure Logic
PATHAA EMPLOYEE (BB) EXPERTISE 017 IF PATH-ID EQ 'BB' 500 - 017500 MOVE 'NO EMPLOYEE' TO MESSAGE
If CA Culprit does not find an occurrence of an employee, it returns BB to the PATH-ID field. The user's procedure logic tests the value of PATH-ID. If PATH-ID equals BB, CA Culprit moves a message to a work field for output.
Example 2: Using REC-NAME on an Edit Parameter
PATHF3 COVERAGE ALL-MEMBERS (COVERAGE-CLAIMS) 0151*010 REC-NAME
This PATH parameter instructs CA Culprit to navigate the COVERAGE-CLAIMS set illustrated in the 'Example of a Multiple-Member Set' schema available in the PATH Parameter section. When CA Culprit navigates the multiple-member set, it returns either HOSPITAL-CLAIM, NON-HOSP-CLAIM, or DENTAL-CLAIM to the REC-NAME field. The name of the member record can be output by coding REC-NAME on a type 5 edit parameter.
Example 3: Using TABLE-ID as a Subscript
INPUT TABLE=ACCOUNTING TYPE=COPY INPUT TABLE=PERSONNEL TYPE=CONSOL 010 DEPARTMENT.2 'ACCOUNTING DEPARTMENT' 'PERSONNEL DEPARTMENT' 0151*010 DEPARTMENT.TABLE-ID 0151*020 EMP-NAME-0415
This example consolidates the ACCOUNTING and PERSONNEL tables. For each row of the ACCOUNTING table, TABLE-ID has a value of 1; for each row of the PERSONNEL table, TABLE-ID has a value of 2. CA Culprit uses these values to reference each occurrence of work field DEPARTMENT.
Example 4: Field Name Level Qualifiers
PATHAA EMPLOYEE STRUCTURE (REPORTS-TO) EMPLOYEE (MANAGES) SELECT EMPLOYEE 2 IN PATH AA * WHEN EMP-NAME-0415(EMPLOYEE,2) EQ 'HERBIE BABIE' 0151*010 EMP-NAME-0415 0151*020 EMP-NAME-0415 (EMPLOYEE,2)
Path AA contains two occurrences of the EMPLOYEE record; level 1 is the entry record and level 2 is the record retrieved using the MANAGES set relationship. The SELECT parameter tests the level 2 occurrence of the EMPLOYEE record for employee Herbie Babie. In the output shown below, column 1 contains the names of employees who report to Herbie Babie:
NANCY TERNER HERBIE BABIE ROBIN GARDNER HERBIE BABIE JANE FERNDALE HERBIE BABIE HERBERT LIPSICH HERBIE BABIE SANDY KRAAMER HERBIE BABIE
Example 5: Field Name Level Qualifiers
INPUT 100 FN=ACCT-FILE-1 INPUT 100 FN=ACCT-FILE-2 0151*010 ACCT-NUMBER 0151*020 ACCT-STATUS(2)
This match-file run specifies two INPUT parameters. Each names an input file defined to the data dictionary. Because ACCT-FILE-1 and ACCT-FILE-2 have the same record structure, the input field names must be qualified by level number. The type 5 edit parameter that specifies ACCT-NUMBER refers to a field in a record within ACCT-FILE-1, the first file defined for the CA Culprit run. ACCT-STATUS(2) refers to a field within the second file, ACCT-FILE-2.
Example 6: Column Qualifiers in a Table View
INPUT TABLE=BUDGET 0151*020 EMP-NAME 0151*030 EMP-NAME(RFUR-000115-DATA OF BUDGET)
Table BUDGET is a view of two stored tables. The view has two columns with the same name, EMP-NAME. The first type 5 parameter references the first occurrence of EMP-NAME in the table view.
The second type 5 parameter qualifies the second occurrence of EMP-NAME in the table view. The values in parentheses refer to the database record name of the stored table in which the column occurs (RFUR-000115-DATA) and the name of the logical record that defines the view (BUDGET).
|
Copyright © 2014 CA.
All rights reserved.
|
|