HP 3000 Manuals

How the Migration Aid Works [ HP FORTRAN 77/iX Migration Guide ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Migration Guide

How the Migration Aid Works 

The migration aid consists of a program file (FTNCVT.PUB.SYS) and a
second file (FTNCMDS.PUB.SYS) containing all the commands that could
potentially be applied to a source file.  Each group of related commands
in the command file contains optional text and the commands themselves.
The following is an example of a group of commands that affect character
constants wherever they are found, except in FORMAT statements.

     $ The next changes will affect character constants of the form %nnC.
     $ They will be converted to CHAR(nn) except if they are found on the
     $ same line as a FORMAT statement.
     $ Note that numbers of the form %nn,%nnJ,%nnL,%nnR,%nnD won't be
     $ changed.
     n/@format@% *[0-7]+ *c//&/
     g/% *{[0-7]+} *c//CHAR(&1B)/

The lines starting with dollar signs explain the changes performed if the
command group is selected.  See Chapter 6 ("Customizing the Command
File") for an explanation of the command syntax.  The lines without
dollar signs contain the commands themselves.

When the migration aid is run, the following prompt occurs after each
explanation:

     apply these commands? (expected Y,N,A)

These are the valid responses:

   Y                  Performs the described conversion wherever the
                      construct occurs in the source file.

   N                  Performs no conversions of the kind described.  (A
                      carriage return assumes this response.)

   A                  Asks the user before performing each conversion.

   E                  Exits the program without performing any
                      conversions of the kind described.

(Note that both uppercase and lowercase are accepted.)

No conversions are done until you have responded to all command prompts.
Then, for each group of commands to which you responded Y, the migration
aid applies the commands to all appropriate lines and displays each
converted line, followed by the line with its changes.

If you selected A (ask) for a group of commands, the migration aid
displays the original line, then the line with the changes made so far,
and prompts you with:

     apply it? (expected Y,N)

The line is then changed (or not) according to your answer.

The output file contains the source file with the changes performed by
the migration aid.  The lines that were changed are left as comments (a C
is inserted at column 1), and the label MIGF66 is placed in columns 73
through 77.  The label MIGF77 is placed in columns 73 through 77 of new
lines.  This label identifies each line that has been modified or added
by the migration aid.  Note that the converted file will be 10 to 20
percent larger than the original, since the old versions of the converted
lines are retained as comments; the actual percentage of increase depends
on the number of lines converted.

See the chapter "Using the Migration Aid" for a complete example of the
migration process.



MPE/iX 5.0 Documentation