Progress
ADM 2 Guide


Customizing the Conversion Utility

This section identifies the Conversion Utility source code and describes why you might want to access it to make modifications.

The source code for the Conversion Utility is shipped with the tool. This code was written in the AppBuilder and should be maintained in the AppBuilder. The procedure protools/convt89.p performs the majority of the conversion tasks; it has no user interface. This procedure is called by the protools/v89conv.w dialog, which contains most of the Conversion Utility user interface. Much of the conversion process is table driven from the protools/v89names.dat file.

CAUTION: Carefully review the contents of the protools/v89names.dat file to ensure that you know how the Conversion Utility will change your code. You can edit this file to ensure that your customized code is not removed. For example, if you customized the state–changed internal procedure and do not want this procedure to be removed during the conversion, make the appropriate edit in the protools/v89names.dat file.

Generally, the Conversion Utility can fulfill most of the user’s conversion needs. However, if you need to perform a few one-for-one substitutions, you can do this by creating more entries in the “++ Old Name ++New Name” section of the protools/v89names.dat file.

NOTE: Use caution when performing these one-for-one substitutions. The Conversion Utility checks each line of code in each of the files to be converted for each of these entries. Consequently, if you convert 1000 files and each file contains an average of 600 lines of code, each entry in this section causes 600,000 lookups.

The “++ Remove List” section of the protools/v89names.dat file lists several attributes and procedures that are used in Version 8 but are obsolete in Version 9. You can add to this list to remove occurrences of attributes and procedures that must be removed from the source files.

If you want to add or modify features in the Conversion Utility, you should study the code in protools/convt89.p and perform the changes. An easy change to make is to use custom prefixes (that is, prefixes other than adm- and local-) for your ADM1.1 methods. You should edit protools/convt89.p and initialize the variable cCustomPrefix with your own prefix. For example, if your prefix is ajax-, then you must give cCustomPrefix the initial value of ajax- (including the hyphen).

The “++ Method List” section contains four columns:

  1. The first column contains the Version 8 method name.
  2. The second column contains the name of the Version 9 equivalent.
  3. The third column starts with a “P” if the method remains a procedure or an “FL” if it is converted to a function that returns a logical data type.
  4. The fourth column contains parameter information for the method. It is a quoted string containing comma-delimited triplets, each of which includes the following components:
    1. The first component is the parameter name.
    2. The second component is the data type.
    3. The third component, which identifies the parameter type, is either “I” for INPUT, “O” for OUTPUT, or “I–O” for INPUT–OUTPUT.
    4. The triplets themselves are delimited by the vertical bar (|) character.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095