The SELECT, SORT, BREAK, LIST, and HEADING statements function as discussed previously. The other statements function as follows:
The first INPUT statement identifies the primary input file.
The second INPUT statement identifies a secondary file. KEY = 2CC1-1 defines the matching key field for each record in the secondary file. In this example, position 1 of the secondary file is to be used as the matching key field.
The MATCH parameter designates the first position of the USER INFO field of the primary input file as its matching key field. Primary and secondary file records are matched based upon their respective key fields.
TABLE indicates that the secondary file is a table file to be read completely at the start of the run. Consequently, the entire file is available for searching during the run. The field composed of positions 2 through 21 in the secondary file contains the department name information.
The notation 2CC2-21 serves two purposes. It:
The DEFINE statement creates a work field DEPT NAME for the run and sets its initial value to blanks. The (K) suffix indicates that the field will be maintained by you and will not be reset to blanks when a new record is processed.
Three COMPUTE statements are given for this sample. The last two statements have been described in earlier reports (see report JARSWZ03).
The COMPUTE IF MATCHED condition specifies what CA JARS Wizard should do when a matching user information code is found in the secondary file. Here the work field DEPT NAME is assigned the value of the data in positions 2 through 21 of the secondary file. If a match is not made, the DEPT NAME is assigned a value of UNKNOWN DEPT CODE.
| Copyright © 2012 CA. All rights reserved. |
|