HP 3000 Manuals

General Information about Forms [ HP Business BASIC/XL Migration Guide ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Migration Guide

General Information about Forms 

Forms Utility Programs 

The CFORM, MFORM and PFORM utility programs are not supported on the HP
3000.  If you convert your HP 260 forms files to JOINFORMs (the
FORMS/260 compatible forms supported by Business BASIC), the program
JOINEDIT.PUB.SYS should be used to merge, create, modify and print forms
on the HP 3000.  If you convert your HP 260 forms files to VPLUS (the
block mode forms package), you should use FORMSPEC.PUB.SYS to create,
modify and print forms.  JOINFORM forms are more compatible with HP 260
forms than VPLUS forms.  On the HP 3000, the HALT key is unavailable when
an HP Business BASIC/XL VPLUS form is active.  VPLUS forms allow only 128
fields; FORM/260 and JOINFORM allow 200 input fields and 200 output
fields each.

On the HP 3000, both forms packages support form files with more than one
form.  Substantial time may be saved by using one form file, as the
system only needs to open one file.  Although manual changes are required
to source programs to take advantage of this feature, the performance
improvement will probably make this worthwhile.

The rest of this section applies only to JOINFORM migrations.

Print Control Functions 

The functions LIN, TAB, PAGE and CTL have no effect when they are printed
into an active form in Business BASIC. On the HP 260 they act in a
strange way; they are not intended to be used within forms.  To be
compatible, do not use these functions when printing to a form.

LDISP.  HP Business BASIC/XL's LDISP statement works differently from the
260 LDISP statement when one output item is a null string.  In BASIC/260,
the first null string output on the line causes the line to be cleared
from the current cursor position to the end of the line.  So, if there is
no null string, then the line is not cleared.  In HP Business BASIC/XL,
LDISP always clears the line before beginning to output values.

TFLD/TFNUM 

The TFLD function, which is known as TFNUM on the HP 260, must be used
with some restrictions in a Business BASIC program due to the fact that
the T key on a HP 3000 terminal is local to the terminal and is not
transmitted to Business BASIC. For example, if Business BASIC places the
cursor in input field 5 and the user presses the T key twice, TFLD does
not return 7, as it would on the HP 260, but returns 5 instead.  This was
the last position known to Business BASIC. (It should be also noted that
back tabbing does not work either.)

When the user hits R, TFLD returns the number of the last input field
which was entered legally with the CURSOR statement or normal field
sequencing, but not via the T key.

To be compatible, train your users not to use the T key at all while in a
form.

If you want to let your users use the T key to position the cursor to the
fields they want to input, the program should use the screen in block
mode.  Do this by putting an INPUT loop in the program.  The INPUT loop
gives the user the ability to enter data values into the form and also
provide an ACCEPT DATA softkey which the user will press when done.
Then, read the screen using ENTER statements or the Business BASIC
callable routine, BB_BLOCK_READ. This same approach can be used on the HP
260 with the ENTER statement, making migration easier.

     ON KEY 1 GOTO Read_screen;LABEL="ACCEPT DATA"
     LOOP
        INPUT ""       ! No prompt will appear
     ENDLOOP
     Read_screen:   ! Solution 1
     FOR I=1 to Num_fields
        ENTER A$(I)   ! User must decipher what this means
     NEXT I
     Read_screen:   ! Solution 2
     EXTERNAL PASCAL Bb_block_read(Buffer$, SHORT INTEGER Status)
     CALL Bb_block_read(Screen$, Stat)
     ! User must not decipher Screen$

Another solution, for a program which uses a field by field data entry
method, is to provide "NEXT FIELD" and "PREVIOUS FIELD" softkeys.

Video Enhancements in Form Fields 

When simulating graphic output to a form (for example, bar charts),
BASIC/260 uses video enhanced characters, such as inverse video and
blinking.  The same is possible in Business BASIC but the enhanced
characters contain escape sequences which are counted as if they were
ordinary printed characters within the field.  Programs which worked on
the HP 260 may fail with error 120 (output field overflow) when converted
to Business BASIC.

To be more compatible do not use DISP with enhanced characters; instead,
use the CURSOR statement with the enhancement options.

     Instead of:

            CURSOR OF#20
            DISP RPT$("<inv.blank>",Full)&RPT$("<halfbr.blank>",Half)

     use:

            CURSOR OF#20,IV(Full)
            CURSOR (XPOS+Full),IV(Half),HB(Half)

     This will be converted by BBCT250.PUB.SYS into:

            CURSOR OFLD(20),("I",Full)
            CURSOR (,CPOS+Full),("I",Half),("H",Half)

     This, unfortunately, is not exactly correct and must be manually
     changed to:

            CURSOR OFLD(20),("I",-Full)
            CURSOR (,CPOS+Full),("IH",-Half)

Otherwise one enhancement overwrites the other.  (The minus sign is for
optimization and is not required.)

Cursor Behavior 

An unfortunate characteristic of protected and unprotected fields on HP
3000 terminals causes the cursor to automatically skip to the beginning
of the next field in a form when the user types a character at the end of
the previous field.  This may lead the user, who is accustomed to the HP
260, to think that the characters on the previous field have been entered
and processed.  This is not the case, and the user will have to be
trained to press R before the data will be processed.

Forms longer than Screen 

When using a JOINFORM which is longer than the terminal screen (longer
than 24 lines) in format mode, the user may observe that the form and the
cursor seem to jump around.  The program results are correct but the
visual behavior may be different from the HP 260.  There is no way to
prevent this other than to avoid long forms or to paint the form with
DISP and LDISP in the program rather than using format mode.

Output Buffering 

In Business BASIC, a PRINT statement which ends in a semicolon buffers
the output instead of printing.  The next PRINT statement will append its
output to the buffer.  When a form is active, the effect of the semicolon
is to be able to print several variables in one form field.  In Business
BASIC, none of the buffered output will appear on the form until a PRINT
statement without a semicolon is executed.

This may affect error handling and will definitely affect programs which
perform the last output to a form with a PRINT statement which ends with
a semicolon.  In this case, the output will not appear at all.

Softkeys During Form Input 

In Business BASIC, if a user presses a softkey during an INPUT, for
example, after some characters have been typed on the form, the softkey
terminates the input state and the input is not assigned to the variable.
This is the same as for a normal INPUT (see previous section).


CAUTION Do NOT have the MODIFY mode ON during input from a form. Do NOT type or press softkeys while output into a form is in progress, or while your form is being painted on the screen; this may destroy your form. Do NOT have the INSERT CHAR key set when a form is painted to the screen. On some terminals, which are not supported for use with JOINFORM, your form may be destroyed.


MPE/iX 5.0 Documentation