|  |  | y 2 k
## Countdown to 2000 |
Start scenario Program source Input seed file Year 2000 Analysis Formatted report Analysis format Seed format Cross compilation Overview |  |
Guide to Year 2000 Analysis input seed format
The seed file(XSD) contains information that allows the user to describe the occurance of year related information to the analysis tool. A sample seed file is provided in the \SAMPLES\SEEDFILE subdirectory of the root program directory. The seed file is made up of a variety of tags that have a style similar to HTML. The beginning of every seed is marked with a <SEED> tag with an optional </SEED> tag to end the seed. In addtion to specifing seeds, the user may also put in comments to document the seed file. These comments take the form of a start comment tag and a required end comment tag. All text between these two tags is ignored by the analysis tool. Here's an example of a comment tag. <comment> ====================================== Sample Initial Seed File IBM VisualAge for COBOL Professional IBM VisualAge PL/I Professional ====================================== </comment>
<builtin-year>
The user can seed applications by taking advantage of builtin functions, type conversions, literal analysis, and intrinsic functions. To take advantage of this form of seeding, the user must specify a seed to turn on builtins. This is done through the builtin seed. The bultin seed has the <builtin-year> tag inside of the seed which turns on the analysis. The user may also specify annotations that will be attached to all results that are either directly or indirectly affected by the <builtin-year> tag. <seed> <builtin-year> <annotate> Affected by an intrinsic function </seed>
<pattern>
The pattern seed is among the most effective ways to pick out variables that might be year related. The pattern seed allows you to identify variables through patterns matching their names and attributes matching their types. A pattern is a string that can include the wildcards * or ? to match characters. An * will match any number of characters and the ? will match only a single character. For a pattern seed to match, both the pattern and attribute must match. The attribute is a simplified PIC clause that only models if the byte is alphabetic, numeric, or alphanumeric. In PL/I, there are additional attribute types to correspond to the types available in PL/I. The user is allowed to specify multiple patterns inside of a seed. To make the seed match, only a single pattern must match. The user may also specify multiple attributes inside of a seed and the variable must first match a pattern inside of the seed and then match any of the attributes inside of the seed. If no attributes are listed, then any attribute will match. The seed below will match any variable (such as date, today, and saledate) if the attribute matches one of the seeds. <seed> <pattern> *date* <except> *update* </pattern> <pattern> *today* <pattern> *yesterday* <pattern> *tomorrow* <attribute> 99X99X99 <attribute> AAA9999 <attribute> 999999 <attribute> 99999999 <attribute> 99AAA99 <attribute> fixed-dec </seed> In the above example, a new tag was also exposed. The <except> tag describes an exception to the previous pattern and prevents a pattern match if the except pattern also matches. For instance, in the above example, the pattern "*date*" will never match a variable called astupdate since the "*update*" except pattern is specified in relation to the "*date*" pattern. However, a variable called updateTomorrow will match since the pattern "*tomorrow*" matches and has no exceptions. As a result of a pattern seed matching, an observation is made about the variable to the analysis engine. In the example above, the entire variable will be marked as a used-as-year. However, the user might want to specify a part of the variable to be marked as a year and another part of the variable to be marked as non-year. This can be done by specifing the correct kind. For instance, the user may specify that the first two bytes should be marked as <USED-AS-YEAR> and the last four bytes should be marked as <USED-AS-NON-YEAR>. An example seed is listed below. <seed> <pattern> *DATE* <attribute> 999999 <used-as-year> <index> 1 <length> 2 </used-as-year> <used-as-non-year> <index> 3 <length> 4 </used-as-non-year> </seed>
#### Comments to: shieldhe@us.ibm.com