This document describes how you can use the ChangeMaster FIND command to perform an
Impact Analysis when database changes are being considered. The find command will help you locate
where specific fields are used in your source files.
The ChangeMaster Find command searches all members in a specified source physical file
for one of several patterns. For example, you can specify patterns to look for field names
that contain specific letters.
The Find command can optionally produce a summary of how many matching lines were
found, as well as how many members contained matches.
Summary Statistics
A summary at the bottom of the listing indicates the total number of source lines that
contained at least one match, and the total number of members that contained a match.
The following is a sample that was obtained in searching a small sample source file
containing 102 RPG source members:
Impact Estimates
From these statistics, you can create an estimate of the size, effort, and costs of
performing the database change. One could use some formula, such as $1.00 per line of code
containing a match, plus some additional base cost estimate, such as $100.00 per
program object that must be modified. In this example above, the estimated total
conversion costs would be $2,161 to convert these 11 RPG programs, based on this formula.
This kind of formula can be used to help "size" or estimate a project, for planning purposes.
Each IT department manager or consulting firm should come up with their
own formulas that take into consideration the complexity of the customer's environment
and the skill level of the staff who will perform the work, for such estimates
to be reasonably accurate.
Find Command Usage Notes
Run the CHMFND command once for each unique source physical file to be
analyzed. Typically, for each "production" source library, this might include: QCLSRC,
QCMDSRC, QCBLSRC, QDDSSRC, QFMTSRC and QRPGSRC. You can also create a small
CL "driver" program that invokes the CHMFND command once for each source file name
you want to search, so that you can automate the procedure used to search all
source files in a particular library, where the library name could be passed to the
CL program as a parameter. NOTE: You may need to make some slight adjustments,
depending upon the naming conventions in use at each particular client site.
Find Command - Sample Run
This example searches all members in ISSSRC/QRPGSRC for one of several
patterns, looking for field names that appear to be date-related. The COND(*OR)
parameter indicates that any of the patterns found on a single line constitutes a
"match" condition. The OPTION(*COUNT) parameter requests a summary of how many
matching lines were found, as well as how many members contained matches. The
MATCH parameter contains a list of up to 30 patterns of up to 16 characters each
in length.
Find Command - Sample Output
The following is sample output from the CHMFND command shown above,
which was run on a small RPG source file on one of our AS/400 systems.
Total source lines containing at least one match: 1061
Total number of source lines scanned for a match: 34982
Percentage of source lines containing a match: 3.03
Total source members containing at least one match: 11
Total number of source members scanned for a match: 102
Percentage of source members containing a match: 10.08
CHMFND PROJ(DEMO) OBJ(*ALL) TYPE(*SRC) ATTR(*ALL) VRSN(*NONE) +
PATH('ISSSRC/QRPGSRC') COND(*OR) +
MATCH('DATE' 'DT' 'DAY' 'MM' 'MONTH' 'YEAR' 'YR' 'YY' +
'10000.01' '100.0001') TO(*PRINT) OPTION(*COUNT)
CHMFND Industrial Strength Software Company 10/27/01 11:02:32
ChangeMaster Find Pattern Listing
Project: DEMO
Patterns to Find:
DATE
DT
DAY
MM
MONTH
YEAR
YR
YY
10000.01
100.0001
Sequence
Number Source Statement
>>> ISSSRC/QRPGSRC,TRNBLD;SRC!RPG <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
4700 C WHOTYP ANDNE'*DTAARA'
>>> ISSSRC/QRPGSRC,TRN001;SRC!RPG <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
1100 * KJ CMD/10 UPDATE
1800 * 41 USER VALID FOR UPDATES
2000 * 43 UPDATE MODE
2500 * 51 ACQUIRE SEQUENCE # AT UPDATE/DELETE MODE
5800 * SUBMIT JOB COMMAND
6800 * END JOB COMMAND
7500 * DELETE SPOOL FILE COMMAND
10100 C Z-ADDUDATE XREQDT
12400 C *LIKE DEFN REQDTE SAVRDT
12600 C *LIKE DEFN REQDTE NOWDTE
12700 C *LIKE DEFN REQDTE DREQDT
13200 C *LIKE DEFN SBMDTE XSBMDT
17800 C Z-ADDUDATE XREQDT
19500 C UDATE MULT 100.0001 NOWDTE
19600 C REQDTE MULT 100.0001 DREQDT
19700 C DREQDT IFGT NOWDTE
19800 C REQDTE MULT 100.0001 XREQDT
20000 C Z-ADDUDATE XREQDT
20100 C END (DREQDT)
20600 C END (DREQDT)
21100 C* NO UPDATES FOR JOBS RELEASED AND COMPLETED
23400 C Z-ADDXREQDT SAVRDT
26000 C* REQUEST DATE, TIME, TO, FROM LIBRARY CHANGED - UPD RCD
26200 C XREQDT IFNE SAVRDT
27300 C XREQDT MULT 10000.01 REQDTE
29500 C* CMD/10 PRESSED - UPDATE
37000 C Z-ADD0 CMPDTE
37200 C Z-ADDUDATE XSBMDT
37300 C XSBMDT MULT 10000.01 SBMDTE
37500 C Z-ADD0 RELDTE
47100 C XREQDT MULT 10000.01 REQDTE
47600 C Z-ADD0 CMPDTE
47800 C Z-ADD0 SBMDTE
48000 C Z-ADD0 RELDTE
75400 C XREQDT MULT 10000.01 REQDTE
87600 ** CL COMMANDS
87900 ENDJOB JOB( ) OPTION(*IMMED)
>>> ISSSRC/QRPGSRC,TRN002;SRC!RPG <<<<<<<<<<<<<<<<<<<<<<<<<<<<
5800 I* 1 60@UDATE
5900 I* 1 20@UYY
6000 I* 3 40@UMM
6600 I 3 40@UMM
7300 * RELEASE JOB COMMAND
10000 C KFLD REQDTE
20000 C MOVEL*LOVAL REQDTE
20800 C MOVEL'UPDATE ' XMODE
21700 C Z-ADD0 XREQDT
23300 C REQDTE MULT 100.0001 XREQDT
35600 C UDATE MULT 10000.01 RELDTE
47100 ** VALID USERS FOR UPDATE
47500 ** CL COMMANDS
>>> ISSSRC/QRPGSRC,TRN003;SRC!RPG <<<<<<<<<<<<<<<<<<<<<<<<<<<<
5700 I* 1 60@UDATE
5800 I* 1 20@UYY
5900 I* 3 40@UMM
8600 C KFLD REQDTE
18600 C MOVEL*LOVAL REQDTE
19400 C MOVEL'UPDATE ' XMODE
20300 C Z-ADD0 XREQDT
21900 C REQDTE MULT 100.0001 XREQDT
44100 ** VALID USERS FOR UPDATE
>>> ISSSRC/QRPGSRC,TRN004;SRC!RPG <<<<<<<<<<<<<<<<<<<<<<<<<<<<
3600 I* 1 60@UDATE
3700 I* 1 20@UYY
3800 I* 3 40@UMM
5700 C $KEYY KLIST
16600 C $KEYY SETLLTRNDDL03 90
18300 C Z-ADD0 XRELDT
18400 C Z-ADD0 XREQDT
18500 C Z-ADD0 XCMPDT
19700 C REQDTE MULT 100.0001 XREQDT
19800 C RELDTE MULT 100.0001 XRELDT
19900 C CMPDTE MULT 100.0001 XCMPDT
>>> ISSSRC/QRPGSRC,TRN005;SRC!RPG <<<<<<<<<<<<<<<<<<<<<<<<<<<<
4500 I* 1 60@UDATE
4600 I* 1 20@UYY
4700 I* 3 40@UMM
7300 C KFLD REQDTE
12400 C MOVEL*LOVAL REQDTE
13700 C Z-ADD0 XREQDT
15300 C REQDTE MULT 100.0001 XREQDT
15500 C RELDTE MULT 100.0001 XRELDT
>>> ISSSRC/QRPGSRC,TRN010;SRC!RPG <<<<<<<<<<<<<<<<<<<<<<<<<<<<
3500 I* 1 60@UDATE
3600 I* 1 20@UYY
3700 I* 3 40@UMM
5600 C $KEYY KLIST
16500 C $KEYY SETLLTRNDDL05 90
16600 C $KEYY READETRNDDL05 8990
17700 C Z-ADD0 XRELDT
17800 C Z-ADD0 XREQDT
17900 C Z-ADD0 XCMPDT
18900 C REQDTE MULT 100.0001 XREQDT
19000 C RELDTE MULT 100.0001 XRELDT
19100 C CMPDTE MULT 100.0001 XCMPDT
19400 C $KEYY READETRNDDL05 90
>>> ISSSRC/QRPGSRC,TRN014;SRC!RPG <<<<<<<<<<<<<<<<<<<<<<<<<<<<
7600 C* ADD/UPDATE VERSION OF GIVEN SOURCE MEMBER
>>> ISSSRC/QRPGSRC,TRN019;SRC!RPG <<<<<<<<<<<<<<<<<<<<<<<<<<<<
5800 I* 1 60@UDATE
5900 I* 1 20@UYY
6000 I* 3 40@UMM
6600 I 3 40@UMM
7300 * SUBMIT MOVE OBJECT JOB COMMAND
10300 C KFLD REQDTE
20300 C MOVEL*LOVAL REQDTE
21100 C MOVEL'UPDATE ' XMODE
22000 C Z-ADD0 XREQDT
23600 C REQDTE MULT 100.0001 XREQDT
35900 C UDATE MULT 10000.01 RELDTE
47400 ** VALID USERS FOR UPDATE
47800 ** CL COMMANDS
Total source lines containing at least one match: 106
Total number of source lines scanned for a match: 3498
Percentage of source lines containing a match: 3.03
Total source members containing at least one match: 9
Total number of source members scanned for a match: 12
Percentage of source members containing a match: 75.00
Copyright © 2002 by Industrial Strength Software Company.
All rights reserved.