To perform file matching, CA JARS Wizard processes data from a primary input file and up to three secondary files in a run. A secondary file can be either of the following:
The primary input file should be defined by a glossary. Secondary files do not have to be defined by a glossary since items can be referenced in general or by DEFINE statements in the run.
CA JARS Wizard has an fCCa-b notation to refer to data fields in secondary files. 2CCa-b defines positions in the first secondary file. 3CCa-b refers to the second, and 4CCa-b to the third. For example, 2CC20-25 refers to positions 20 to 25 in the first secondary file, and 3CC20-25 refers to the same positions in the second secondary file.
The keywords MATCHED and MISSING can be used in SELECT and COMPUTE statements to determine whether a match has occurred between the primary input file and the secondary files. Processing can then be directed accordingly, based upon this determination.
Example:
INPUT PRIMARY-INPUT-FILE
SELECT REC/TYPE EQ 'E'
INPUT FILE KEY=2CC1-4 MATCH=APPL CODE TABLE=2CC5-20
INPUT FILE KEY=3CC1-4 MATCH=APPL CODE
SELECT MATCHED1 AND MATCHED2 AND DIV CODE EQ 'T' AND MONTH EQ '05'
COMPUTE APPL NAME(K)(C)(16) EQ 2CC5-20,
PROGRAMMER TIME(N)(4) EQ 3CC48-51
SORT APPL CODE
BREAK APPL CODE
LIST(SUM) APPL NAME, APPL CODE, PROGRAMMER TIME, ACTIVE TIME
Use this example when introducing secondary input to the run. When INPUT is used it sets up the "key" pointing to the secondary input file and also indicates what it should "MATCH" in the glossary. COMPUTE if matched will match based on what criteria you give it.
This example assumes the following:
The following processing actions are made in this example (the exact sequence of operations varies from run to run, according to the specific requirements for the run):
The product of this example would be a summary report with the month's totals for each application code. The line would contain the application name, the application code, the total programmer hours from the tape file, and total active time from all records for the application in the file.
Note: For more information about multiple file processing, see the INPUT, SELECT, and COMPUTE statement discussions in the "Control Statements" chapter.
| Copyright © 2012 CA. All rights reserved. |
|