HP 3000 Manuals

Learning How to Use MPE XL [ HP Business BASIC/XL Migration Guide ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Migration Guide

Learning How to Use MPE XL 

There are many architectural differences between the HP 260 and the HP
3000.

These differences extend to the environments of the two machines.  If you
have not previously used an HP 3000, take any of the following courses
that apply to the products you use and the tasks you perform:

 *  Using the 900 Series HP 3000

    Part Number pending

 *  900 Series HP 3000:  Programmer's Skills

 *  900 Series HP 3000:  System Operation Skills

 *  900 Series HP 3000:  System Management Skills

 *  VPLUS/3000 for Programmers

 *  TurboIMAGE DBMS/3000

Some differences between the HP 260 environment and the HP 3000
environment are discussed below.  Many HP 3000 subsystems are similar to
those on the HP 260.  Familiarize yourself with the new environment and
the commands needed for using the subsystems.  Refer to the MPE XL 
Reference Manual for more information about the HP 3000 environment.

The HP Business BASIC/XL interpreter can cause a heavy machine load.
This affects the performance of everyone using the system.  Low-end
machines need plenty of memory to insure the full performance benefits of
the HP 3000.

Other suggestions depend on specific applications you are using.

Using the Compiler 

In addition to an interpreter (the implementation of BASIC that exists on
the HP 260), HP Business BASIC/XL provides the ability to compile
programs.  The program statements are translated into HP Precision
Architecture machine instructions, then your HP Business BASIC/XL program
executes as a separate, independent process.  Performance improvements
for most applications are substantial.  The overhead of running the
interpreter is also eliminated.  Because BASIC/260 is strictly an
interpreter, that language includes a number of program statements that
are not compilable.  Execution of these statements requires information
that is not available until run time, so the machine instructions cannot
be determined during compilation.  The statements listed below are not
supported in compiled applications.  Remove them from production programs
that will be compiled.

          COMMAND                 GETSUB              SECURE
          DEFAULT                 MERGE               TRACE
          DELETE                  RESAVE              PAUSE
          LINK                    SAVE
          GET                     SCRATCH

The statements above produce compile-time warnings.  Most of them produce
run-time errors when they execute.  (TRACE and PAUSE are ignored and you
can leave them in the program.)

You can skip these statements when you run your program by using the HP
Business BASIC/XL function, INTERPRETED in the predicate of an IF
statement that contains the statement.  The function, INTERPRETED,
returns true when you execute a program in the interpreter, and false
when you execute the compiled version.  The migration aid often uses this
function when changing the above statements.

The following HP 260 line is an example:

        GETSUB "mysubs"

This is the migrated version of the BASIC/260 line above:

        IF INTERPRETED THEN GETSUB "mysubs"

COMPILER OPTIONS.  Compiler options, such as NO HALT CHECKING, NO ERROR
HANDLING, NO RANGE CHECKING, and NO REDIM, can make a big difference in
the amount of code generated and in the overall performance of a program.
In HP Business BASIC/XL, when you do not use compiler options, the
compiler produces code for error and exception handling that your
application might not need.

For more details about specific compiler options, refer to the the HP 
Business BASIC/XL Reference Manual.

Use the ANALYST environment in the interpreter to estimate code savings
for specific compiler options.

Softkeys 

Softkeys work differently on the HP 3000 than they do on the HP 260.
This affects both the general program flow and responses to any of the
input statements in HP Business BASIC/XL. The OPTION INPUTLOOPS command
(used in the migration aid) simulates HP 260 softkey behavior to control
input.

On the HP 260, softkeys can interrupt a program at any time, just as the
HALT key can.  Specifically, softkeys can interrupt program when input
has been requested.  After processing softkeys, the HP 260 program
continues to wait for input; softkeys do not terminate input statements.

On the HP 3000, however, you can only use softkeys when input is
requested.  Softkeys can not be used for general program interrupts.
Softkeys terminate input statements in HP Business BASIC/XL. Any data
entered before you use a softkey is lost.

Relative Speed of Screen Updates 

Screen updates are slower in HP Business BASIC/XL because MPE XL machines
do not use memory-mapped terminal buffers.  Buffers provide an easily and
quickly accessible storage area in BASIC/260:  BASIC/260 programs share a
storage area with the 260 terminal.

Slower screen updates are most noticeable in JOINFORM and other 260
applications that directly access the terminal.  Change your JOINFORM
forms to VPLUS forms to maximize screen update speed and overall HP 3000
performance.

To minimize the effects of slower screen updates on your JOINFORM
applications, do the following:

 *  Avoid extra softkey changing.

 *  Eliminate redundant field clearing/updating.

 *  Cache data reading from screen.

Missing Features 

The statements and features listed below refer to BASIC/260 hardware and
software features that are not applicable to MPE XL machines.

ATTACH#                               MEDIA/2501  

BUFFER#                               Multitasking2  

CATFILE                               PERFORM3  

CATLINE                               PRINT LABEL

CHECK READ OFF#/ON#                   READ LABEL

Data Communications                   RELEASE#

DETACH                                REQUEST#

DIRECT                                RESTORE BIN

DOOR LOCK/UNLOCK                      SET DATE TO

DUPTEST                               SET TIME TO

Graphics                              SPACE DEPENDENT/INDEPENDENT

INDIRECT                              STORE BIN

LOAD BIN                              TIO/2504  

Notes 

   1.  HP Business BASIC/XL cannot read from or write to IBM diskette
       media.  However, there is a utility (DISCCOPY/3000) that can move
       data from an IBM floppy disk to an HP 3000.  See the FLEXIBLE 
       DISCCOPY/3000 User's Guide for details.

       ASSIGN;EBCDIC                         DUPLICATE

       ASSIGN;EBCDIK                         IBMDUMP

       CREATE;CHAR                           IBMWREC

       DELETE#                               LINPUT#

   2.  MPE XL has some intrinsics that allow you to control multiple
       tasks.  These intrinsics are different from multitasking on the
       260.  Refer to the process control section of your MPE XL
       Intrinsics Manual.

   3.  Although MPE XL does not provide a facility like PERFORM, many
       emulators (such as AdvanceLink and Reflection) provide record and
       playback of keyboard interaction.  To record and playback keyboard
       interaction of VPLUS applications, use the Forms Tester.  Forms
       Tester only works within VPLUS.

   4.  The following statements are part of TIO/260.  Some of these
       capabilities are available through MPE operating system services.
       You can replace the BREAK ON/OFF and ECHO ON/OFF statements with
       calls to the MPE intrinsic FCONTROL. Refer to the MPE Intrinsics 
       Reference Manual for more information about the following
       statements.

       AREAD$                                ON/OFF DISCONNECT#

       BLOCK MODE ON#/OFF#                   ON/OFF INPUT#

       BREAK ON/OFF                          ON/OFF OUTPUT#

       ECHO ON/OFF                           ON/OFF TRIGGER#

       ON/OFF BREAK#                         SEND#

       ON/OFF CONNECT#                       SEND BREAK#



MPE/iX 5.0 Documentation