HP 3000 Manuals

COBOL Migration Checklist [ HP COBOL II/XL Migration Guide ] MPE/iX 5.0 Documentation


HP COBOL II/XL Migration Guide

Chapter 6  COBOL Migration Checklist 

This chapter contains a checklist for migrating COBOL II/V programs to HP
COBOL II/XL on MPE XL. Because most of the differences relate to machine
and operating system dependencies, if your programs adhere to
ANSI standard COBOL and do not rely heavily on HP extensions or
machine-dependent features, you should have few, if any, changes to make
in migrating your programs to 900 Series HP 3000 computers.

If you are reasonably sure that your programs conform to the ANSI
standard and do not use any of the HP extensions mentioned previously in
this manual, you should be able to run them on MPE XL based systems with
no errors.  The following is a checklist of the required steps for
program migration.

   1.  Use the MPE STORE and RESTORE commands to transfer your COBOL II/V
       source files by tape to the 900 Series HP 3000 computer.

   2.  Check the DATA DIVISION and other sections for any INDEX data
       items or SYNCHRONIZED data items appearing within records.  If any
       appear, either use the INDEX or SYNC $CONTROL options, or both, or
       convert the file as described in Chapter 4.

   3.  Be sure all data items are initialized before being used in COBOL
       II/XL programs.

   4.  Be sure that all calls to system intrinsics use the keyword
       INTRINSIC. You can do this by compiling with the $CONTROL
       CALLINTRINSIC option.

   5.  Check all external names to make sure they are not affected by
       COBOL II/XL changes.

   6.  Search for calls to the pseudo-intrinsic .LOC. If used, change the
       GIVING item description to PIC S9(9) COMP if a 32-bit address is
       needed or to PIC S9(18) COMP if a 64-bit address is needed.  (The
       compiler gives error messages for calls with incorrect GIVING
       items, if you miss these.)

   7.  To check for common exit points from PERFORM statements, illegal
       GO TO statements or invalid ASCII/decimal digits, you may add the
       $CONTROL BOUNDS and $CONTROL VALIDATE options to the file
       COBCNTL.PUB.SYS during the migration process.  (Remove these
       $CONTROL options only after a successful run.)

   8.  Perform appropriate data file conversions, if required.

   9.  Change the COBOLII command in all job files.

  10.  Compile the program, correct any errors and recompile it.  (The
       first time you compile the program, you can include the $CONTROL
       CALLINTRINSIC option in the INFO= string to locate calls to
       intrinsics that do not include the INTRINSIC phrase in the CALL
       statement.)

  11.  Link and run the program (refer to Appendix A for information on
       error messages).  Make final changes, if required.  Then compile,
       link and run the program again until there are no errors.

To achieve the best performance from the program and to generate the most
efficient code in it, follow these steps:

   1.  Change COMPUTATIONAL data items from PIC S9(4) COMP to PIC S9(9)
       COMP and from PIC 9(4) COMP to PIC 9(9) COMP.

   2.  Compile main programs with $CONTROL OPTFEATURES = CALLALIGNED16
       and subprograms with $CONTROL OPTFEATURES = LINKALIGNED16.
       Resolve any errors that occur and recompile the program.



MPE/iX 5.0 Documentation