Once you have drilled down into your applications with Application Understanding and identified the components that have date impacts, turn to the Program Understanding (PU) tool of Visual Age COBOL, Enterprise. Use the Year 2000 Analysis Tool to automate locating date impacts in your programs. Start with the description of program variables thought to be year related that you have gathered and the sample seed file provided to create a seed list as input to PU. These can be in several forms, including patterns with wild cards and attributes (PIC X(6), for example). Using this seed list, the Year 2000 Analysis Tool checks your program for occurrences of variables that match the seed specifications (identified by pattern) as well as any other variables impacted by such occurrences (identified by inference).
You may find that this is an iterative process as you filter the results with your knowledge of the program and consider further patterns and names that should be included as seeds. This will narrow the scope of program elements that must be inspected and changed. The goal is to find all the impacts with a minimum of " false positives." We offer a possible Year 2000 Impact scenario a bit later, and a more comprehensive scenario, IBM Year 2000 for COBOL and PL/I, is available with your VisualAge COBOL product information.
To run the analysis tool, first compile your COBOL
program with the ADATA option using either COBOL for MVS & VM (or COBOL for OS/390 & VM) or VisualAge COBOL. to have a look at compiling from WorkFrame. Then
begin analysis, for program eg0 in this case, by entering the
tool command on the command line:
OS/2 | Windows |
y2krpt eg0 /rego0.xsd | y2krepor eg0 /rego0.xsd |
giving the seed file with the /r switch |
Note: If the program contains CICS statements, compile it on the workstation so that the reports reflect the original CICS source code rather than the generated code.
The input to the Year 2000 Analysis Tool is the SYSADATA file and the seed file, which controls the processing, and the name of the program to be analyzed.
The input seed file contains comments and tag specifications.
The file is in a format similar to the tags found in Hypertext
Markup Language (HTML). You can annotate
the seed file; the annotations will propagate to impacted fields
in the .xrl file (the machine-readable report). to see an image of selecting a seed file from
within WorkFrame.
<seed> tag: Start of a seed specification that may contain:
For example, use the <builtin-year> tag to generate seeds from the COBOL constructs:
More examples can be found in the PU product online help.
The analysis tool creates a line-by-line detail report file,
which can be processed by the supplied program Y2KRPT
(or your own report writer) for you to view. From this report you
know the location of a date data definition and can easily locate
that definition in the source with the COBOL
editor. to see the two views together. It can also be
used as input to editor macros for fixing the date impacts.
You can also to view the graphical flow graph of the program
on OS/2.
You will also get an expanded source file of the program..
When the Year 2000 Analysis Tool has evidence that a program
variable is being used both as a year and as a non-year, it will
mark the variable accordingly (as having kind
<used-as-year-and-non-year>). Use the graphical view and
the program expanded source to find all the impacts for a
date-related variable. to see how to mark all effected variables
(variable INV-DUE was clicked with the
right mouse button) and
to see the results.
The generated report output might contain the following tags:
<annotate> <cics-file-name> <cics-file-variable> <comment> <ddname> <def-pos> <file> |
<inference> <name> <pos> <procedure> <program> <reason> <result> |
The Y2KRPT command on OS/2 or Y2KREPOR command on Windows provided with the Year 2000 Analysis Tool generates formatted Year 2000 reports for your program. You can use these reports for further analysis to determine where your program is impacted by 2-digit years.
The Y2KRPT output provides cross-reference information from the report output file and the seed input file.
You can customize the output of the Y2KRPT command by using the output information to populate database tables. Once this information is in the database, it can be used by and passed to other COBOL programs for queries of the data.
One recommended way to use the Year 2000 Analysis Tool is to tailor the input seed file for your installation, then start to make batch runs against many programs:
You can use parameters in the input seed file to control the starting seeds and the reported results. You can specify the starting seeds, let the tool determine them, or both. Different kinds of change can be processed at the same time. You can annotate changes with the motivation for them. Reported results depend on the change you plan to make and thus what you want to analyze. Information in the report that is related to well-understood changes can be suppressed to focus on specific changes and related impacts. The feature will record a reason that indicates one related cause for the generation of an output seed.
If you don't want to download your source from VSE, turn to Opti-Audit for source-code scanning.
Opti-Audit can be used to scan your COBOL source code to help locate potential date-related COBOL verbs and variables. The output of this scanning, which can include or exclude variables you specify as required, is divided into four reports: