HPlogo HP Data Entry and Forms Management System (VPLUS) Reference Manual: HP 3000 MPE/iX Computer Systems > Appendix L A Programmer's Guide to VPLUS

VPLUS Enhancements

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

There have been many changes and enhancements to VPLUS since version B.04.10. This section will briefly discuss some of the changes and enhancements and how they can be of use to the programmer. The ones reviewed in this section are:

  • HPTOUCH Support

  • Cursor Positioning

  • 264X Function Key Labels

  • Enhanced VGETFORMINFO

  • Batch Mode Formspec Enhancements

  • Color Support for 2627A and 2392A Terminals

  • VCHANGEFIELD

  • VPLUS Environment Control File

HPTOUCH Support (Introduced on VPLUS B.04.10 in MPE G.01.01)

With HPTOUCH support in VPLUS, a programmer may design a form that is to be used with the HP150, the 2393A or the 2397A. Users may select a field by touching the field on the screen. When a field is selected, VREADFIELDS interprets the row and column coordinates into a field number.

VREADFIELDS returns the field number as a negative number to LASTKEY. Negative numbers are returned into LASTKEY so as to distinguish from the positive number that is returned when a function key is hit. LASTKEY is set to -999 if the area touched is not a field. HPTOUCH is enabled by setting bit 0 of the SHOWCONTROL word in the user's COMAREA to 1. An example of coding the HPTOUCH feature is outlined in the VPLUS/V Reference Manual in Appendix E. Currently, HPTOUCH is supported on the 2393A, 2397A and HP150 terminals. For an up-to-date list of the terminals supporting HPTOUCH, refer to Appendix G of the VPLUS/V Reference Manual.

Cursor Positioning (Introduced on VPLUS B.04.10 in MPE G.01.01)

VPLUS displays the screen and positions the cursor to the first field on the form. With some applications, positioning the cursor elsewhere would eliminate the requirement that the user press T to get to the desired field. VPLACECURSOR is a new intrinsic introduced in VPLUS version B.04.10 which allows the cursor to be positioned at an unprotected field. An unprotected field is any field in which the user is allowed to enter data. Protected fields may be headings or display-only fields. If the cursor is positioned at a display-only field, an error is returned. VSHOWFORM should be called first before positioning the cursor. The parameters of VPLACECURSOR are:

  • COMAREA

  • FIELDNUM - If the field number parameter is negative, it implies screen order number. If the field number parameter is positive, field number creation order is implied. The screen order number is a relative number of the field on the form. For example, if there are five fields on a form and the programmer wants to place the cursor on the fourth field, the FIELDNUM parameter would contain a "-4". On the other hand, if the FIELDNUM parameter is positive, it implies field number creation order. This number is assigned to the field when the field is created through FORMSPEC. This number stays with the field unless the form is renumbered through batch mode FORMSPEC or if the field is deleted from the form

264X Function Key Labels (Introduced on VPLUS B.04.10 in MPE G.01.01)

With 264X terminals, there are no function key labels like the 262X or 239X terminals. As of VPLUS version B.04.10 which was introduced in MPE version G.01.01, function key labels may now be displayed on 264X terminals. With this version of VPLUS, function key labels appear in lines 23 and 24 of the terminal display on a 264X terminal. With 264X terminals, function keys may be displayed by performing the following steps:

  1. Select "Y" instead of "X" in the 264X box of the TERMINAL/ LANGUAGE SELECTION MENU.

  2. Define the labels using the same methods as with other HP Terminals, for example, enter the labels using the FORM FUNCTION KEY LABELS MENU, or enter the labels using the GLOBAL FUNCTION KEY LABELS MENU, or set the labels in your program calls to VSETKEYLABEL or VSETKEYLABELS.

  3. Set the LABELOPTION word in the COMAREA to 1 before a call to VOPENFORMF (as with all other terminals).

VGETFORMINFO Enhancement (Enhanced on VPLUS B.04.10 in MPE G.01.01)

Prior to this enhancement, if VFIELDEDITS detected a field in error, the total number of errors would be set in the NUMERRS word of the user's COMAREA. All fields would be highlighted upon a call to VSHOWFORM. No information regarding which fields were found to be in error is passed to the program.

With VPLUS version B.04.10, VGETFORMINFO has been enhanced to return information on all fields in error. The information may be used by the program if a special error routine is to be performed when a certain field is in error. The information buffer returned by VGETFORMINFO has been expanded to include a 16-word array. This 16-word array is a bit map of all the fields on the form and can accommodate the maximum of 256 field numbers. Field numbers may range from 1 to 256, although a form may have a maximum of 128 fields on the form. If the bit corresponding to the field is set to 1, the field is in error.

To decode and set the bits, a new intrinsic called BITMAPCNV is available and documented in the VPLUS/V Reference Manual, Appendix I.

Batch Mode FORMSPEC (Enhanced on VPLUS B.04.10 in MPE G.01.01)

There have been several enhancements to batch mode FORMSPEC. Chapter 7 of the VPLUS/V Reference Manual describes how to use batch mode FORMSPEC. Three new commands are available to the programmer:

  • FIELD - This command allows, several field attributes to be updated in batch mode. Any of the following can be changed: field name, field enhancements, field type, data type, initial value.

  • RENUMBER - This command reassigns field numbers to their screen order numbers. This is particularly useful for forms which have deleted fields and are approaching the maximum field number (256).

  • FKLABELS - This command creates or updates a form's function key labels.

To further enhance batch mode compiling in FORMSPEC, two new JCWs have been introduced: FORMSPECERRORJCW which indicates the count of the number of errors during a compile and FORMSPECWARNJCW which indicates the count of the number of warnings during a compile.

Color Support for 2627A and 2397A (Introduced on VPLUS B.04.15 in MPE G.01.04)

Starting with VPLUS version B.04.15 which was introduced on MPE version G.01.04, 2627A and 2397A color terminal users may have forms displayed with specific colors defined for a field. VPLUS has defined eight color pairs which can be used to enhance fields, highlight fields in error, and display the window. Digits 1 through i correspond to the default color pairs. The color pairs are defined in Chapter 3 of the VPLUS/V Reference Manual. These color pairs can be used along with the normal enhancement set of H, I, B, U, S or NONE for field, error or window enhancements. To use the color enhancements, the formsfile must have an "X" in the HP2627 box in the TERMINAL/LANGUAGE SELECTION MENU in FORMSPEC.

VCHANGEFIELD (Introduced on VPLUS B.04.15 in MPE G.01.04)

Prior to VPLUS version B.04.15, a field defined through FORMSPEC could not be changed in the program. Therefore, if a programmer decided that a field defined as a "REQUIRED" field type should now be considered a "DISPLAY" field type, this could not be done. With VCHANGEFIELD, this is now possible. This intrinsic dynamically alters a field on a form. The changes are temporary, and are not posted to the formsfile. Some of these changes are:

  • Changing field enhancements to the following: H, I, B, U, NONE. Changing field enhancements to S (security) is not available. As of version B.04.20, VCHANGEFIELD has been expanded to allow field enhancements to include a color pair in addition to H, I, B, U or NONE.

  • Changing field types to any of the following: Optional (O), Display (D), Processing (P), Required (R).

  • Changing data type to any of the following: CHAR, DIG, NUMn, IMPn, DMY, MDY, YMD.

User Environment Control File (Introduced on VPLUS B.04.20 in MPE G.02.01)

With VPLUS version B.04.20 introduced in MPE G.02.01, there is an MPE file called VENVCNTL.PUB.SYS which is opened and read on the VOPENTERM call. Currently, the VPLUS USER ENVIRONMENT CONTROL file can control two items when VOPENTERM is executed. Two options have been implemented for the user environment control file.

  • The first option is an abbreviated terminal query. When VOPENTERM is called, it goes through an involved process to identify the terminal type. With the VPLUS user environment control file, this terminal identification process can be shortened. This option should only be used if it is known that a query will return a valid terminal ID. To effect a shortened terminal query, place a "1" in column 1 of the VENVCNTL file.

  • The second option is the ability to enable A/M/U without using a program. Instead of setting the SHOWCONTROL word of the user's COMAREA in your program, use the VENVCNTL file. Placing a "1" in column 2 of the VENVCNTL file enables the keys. This option is particularly useful if you do not have source code for the software packages that you are running, but would like to enable A/M/U.

To implement a user environment control file for VPLUS, build the file:

 :BUILD VENVCNTL.PUB.SYS;DEV=DISC;REC=-80,1,F,ASCII

Use any type of editor tool to place "1" in column 1 and/or column 2. When VOPENTERM executes, it looks for the user environment control file. If it doesn't find it, VPLUS operates as usual. If the file exists and columns 1 and/or 2 are set, VPLUS will perform the abbreviated terminal query and/or the enabling of keys, depending on what columns are set.

It is also possible to have a VENVCNTL file in a different group and account than PUB.SYS. If the file is in another group and account, this file equation is necessary:

 :FILE VENVCNTL.PUB.SYS=VENVCNTL.mygroup.myaccount

For more information on how to implement the features, refer to the VPLUS/V Reference Manual.

Feedback to webmaster