HP 3000 Manuals

Migrating Program Files [ HP Business BASIC/XL Migration Guide ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Migration Guide

Migrating Program Files 

Follow the directions below to migrate program files from BASIC/260 to HP
Business BASIC/XL.

   1.  Back up the files using BACKUP, DUPL, or FVBACK (as described in
       BASIC/260 Utilities Manual).

   2.  Save an ASCII version of the program on the HP 260.  To do this,
       enter the following commands:
________________________________________________________________________
|                                                                      |
|                                                                      |
|                    SCRATCH P                                         |
|                    LOAD "(prog file)"                                |
|                    SAVE "(data file)"                                |
|                                                                      |
________________________________________________________________________

          Figure 19-1.  Saving an ASCII Version of Your Program 

       (data file) is the ASCII version of (prog file).

       _________________________________________________________________ 

       NOTE  Maintain a distinction between files containing the ASCII
             version of a program and files containing data to be read by
             a program.  These two types of files look the same on the HP
             260.  However, Use the DATA FILE TRANSFER softkey to copy
             the ASCII version of a program and use the ARCHIVE TRANSFER
             softkey to copy files that contain data.  When you run the
             migration aid, use the PROG command to migrate program
             files, and the DATA command to migrate data files.
             Otherwise, the results will be unpredictable.

       _________________________________________________________________ 

   3.  Move the data file (created in step 2) from the HP 260 to the HP
       3000 using one of the file move programs described in chapter 18,
       "Moving Files from the HP 260".  Use the DATA FILE TRANSFER
       softkey.  (Refer to the DSN/DS User's Manual for instructions
       about using DSN/DS. For instructions about using TRNSFR, see
       chapter 16, "Moving Files.")

   4.  Change the program file into HP Business BASIC/XL.

       To do this, run the migration aid, then enter the PROG command.
       Here is an example of the PROG command and its screen output:
_____________________________________________________________________
|                                                                   |
|                                                                   |
|      :RUN BBCT250.PUB.SYS                                         |
|                                                                   |
|      HP 260 TO HP Business BASIC/3000 Conversion Utility          |
|      (HP32115Y.01.00).  (1,2)                                     |
|      Copyright Hewlett-Packard Co. 1985.  (1,16)                  |
|                                                                   |
|      => PROG MYFILE.CVRTIN, MYFILE.CVRTOUT, MYFILE.CVRTRPT        |
|                                                                   |
|                                                                   |
|      Records read :   138                                         |
|                                                                   |
|      => EXIT                                                      |
|                                                                   |
|      END OF PROGRAM.                                              |
|      :                                                            |
|                                                                   |
_____________________________________________________________________

          Figure 19-2.  Example of PROG Command and Screen Output 

       Some BASIC/260 features have different syntax than their
       equivalent HP Business BASIC/XL features.  For example, in the
       multiple LET statement (shown below), BASIC/260 uses an equal sign
       (=) to separate the variables receiving the value.  This statement
       assigns the value 5 to the variables A, B, and C.

            10 A=B=C=5

       HP Business BASIC/XL uses commas to separate the variables:

            10 A,B,C=5

       When the migration aid encounters statements like this, it
       translates automatically, without any warnings.  However, the HP
       Business BASIC/XL lines will have a comment that looks like "!**
       SYNTAX CHANGE" appended to them.  This makes them easy to locate
       for reference by using the FIND command.

       Other features in BASIC/260 either do not currently exist in HP
       Business BASIC/XL, or the translation cannot be automated.  When
       the migration aid encounters a feature of this type, it issues a
       warning message to the (message file) and appends a comment that
       looks like "!** UNTRANSLATABLE" to the line.

       The migration aid changes display control characters into escape
       sequences.  However, if the resulting line would be longer than
       252 ASCII characters, the line will not be changed.  Instead, the
       migration aid returns the control characters to their original
       form.  The line is commented out even though it has the correct
       syntax.

       _________________________________________________________________ 

       NOTE  The output file created by the migration aid is an MPE ASCII
             file, not an HP Business BASIC/XL data file.

       _________________________________________________________________ 

   5.  Bring the migrated program file into HP Business BASIC/XL. To run
       the HP Business BASIC/XL interpreter, type in the MPE command
       BBXL:
_________________________________________________________________________________
|                                                                               |
|                                                                               |
|      :BBXL                                                                    |
|                                                                               |
|      HP Business BASIC/XL      HP32715A.00.00    (c) Hewlett-Packard Co. 1989 |
|                                                                               |
|                           WED, AUG 16, 1989, 11:07 AM                         |
|                                                                               |
_________________________________________________________________________________

          Figure 19-3.  Running the HP Business BASIC/XL Interpreter 

   6.  When the HP Business BASIC/XL prompt (>) appears on the screen,
       access the program file created be the migration aid by entering
       the GET command:

            >GET "myfile.cvrtout"

       Any lines with syntax problems are displayed on the screen and
       entered into the program as comments.  Here is an example:
__________________________________________________________________________
|                                                                        |
|                                                                        |
|                    10 SEND OUTPUT TO 17                                |
|                    Syntax error at character 19                        |
|                    Statement needs (,builtin$, identifier$, FNCALL,... |
|                    20 SEND SYSTEM OUTPUT TO 17                         |
|                    Syntax error at character 21                        |
|                    Statement needs (,builtin$, identifier$, FNCALL,... |
|                    >list                                               |
|                                                                        |
|                         10 ! SEND OUTPUT TO 17                         |
|                         20 ! SEND SYSTEM OUTPUT TO 17                  |
|                                                                        |
|                                                                        |
__________________________________________________________________________

          Figure 19-4.  Example Display of Lines with Syntax Problems 

       Now you can list the program, run it, modify it, and so on.

       _________________________________________________________________ 

       NOTE  SAVE the program in a BASIC SAVE file.  This makes it faster
             to GET the program.

       _________________________________________________________________ 

            >SAVE "<BASIC SAVE filename>"



MPE/iX 5.0 Documentation