If the status/window line is the last line on the screen,
it should be no longer than 79 characters. This is because using
the 80th character on the bottom line of the screen causes the screen
to roll up one line temporarily. If this roll-up is not a problem,
then the last line can use 80 characters.
On an HP 264X terminal, when a form is to be appended,
column 80 of any line of the form with an unprotected field should
not be used. When the next form is displayed, column 80 of the current
form disappears.
If you want to enhance text (the protected area
of the screen), you can define a field with a display only field
type and any enhancements you desire. Using the INIT processing phase
specification, text can be initialized to appear in the field. For
example:
This method can also be used to alter "text" on the screen
during execution. Define a display only field with the desired enhancements.
You can either use the processing specifications phases (INIT, FIELD or FINISH) to alter the contents of the field or you can
programmatically change the field contents using VPUTBUFFER or VPUTFIELD intrinsic calls.
|
| |
|
| NOTE: Processing specifications only execute if the application
calls the "editing" intrinsics: VINITFORM, VFIELDEDITS, VFINISHFORM. |
|
| |
|
If you want to define blank lines at the bottom
of a form, define a display only field of at least one character
at the end of the blank lines. Delimit the field by ESCAPE and ESCAPE , with the field enhancements of NONE. This forces the display of seemingly blank lines
and does not affect the application programs. Otherwise FORMSPEC
would delete trailing blank lines from a form.
If you use save fields to accumulate totals and
you expect the user to browse and correct the fields used for summation,
special care must be taken to ensure that the totals are accurate.
If an entered value is summed into a save field, and then this value
is changed in browse/modify mode, the new value is also summed into
the save field unless you specify the SET statement to account for this possibility.
For example, assume you are accumulating values entered in
a field F1 into a save field used for batch totals BT. In order to allow only the correct values to
be accumulated, construct a display-only field OLDF1 identical in its characteristics to F1. The field is initialized to zero in collect mode
only, but not in browse mode. In browse mode, OLDF1 contains the previous value of F1. This previous value is then subtracted from the
sum BT. The following specifications are entered in the F1 Field Menu to ensure that only the correct values
are summed:
INIT
SET OLDF1 TO 0 \executed only in collect mode
FIELD
<any edit statements>
SET BT TO BT + F1 - OLDF1 \executed in browse or collect
mode
SET OLDF1
If you want to include a logical AND function in your processing specifications, use nested IF statements. For example, to get the effect of
use the following statements:
IF A=B THEN IF C=D THEN IF E=F THEN
|
To negate an IF condition, simply use the ELSE part with a null THEN part.
A logical OR or NOR cannot be similarly specified, but for comparisons
on a single field, use IN or NIN with a list. For example, to get the effect of
use the edit statement:
Sometimes in data entry applications, the user would
like to knowingly enter a value that normally falls the designer's
edits. This is called "Edit Override", and can be implemented through
FORMSPEC in a number of ways.
Adopt a user convention to require some special character(s)
in the field along with the desired data. (Note that the field must
be made long enough to accommodate the extra character(s).) For
example:
IF MATCH ?*!! THEN \Skip the edits. ELSE<edit statements> \No trailing "!"; apply normal edits
|
Note that the special characters must satisfy the default
data type edit. The above statement, for instance, would not work
with a numeric field. Some possibilities of special characters for
numeric fields are leading zeros (MATCH O?*), a leading plus (MATCH
!+?*), or a comma (MATCH 000,?*). If signed numbers are expected,
prefix your pattern with !+,-.
Include an auxiliary EDIT OVERRIDE field that must be marked in order to bypass edits.
For example, assume a field named EO:
IF EO MINLEN 1 THEN ELSE<edit statements> EO not marked; apply edits
|
The contributed utility program RESTORE will not correctly copy records larger than 2000
bytes. If you wish to copy a KSAM forms file or reformat file from
a store tape to a disc file, use the MPE :RESTORE command and the FCOPY subsystem.
There are three file equations for which VPLUS checks
during execution. The use of these file equations provides the user
with a way to override the defaults used by VPLUS. These file equations
are also useful when attempting to debug an application with trace
messages or when DEBUG is used. The VPLUS intrinsic VOPENTERM, used by FORMSPEC, ENTRY, and REFSPEC, searches
for a file equation named A264X. VOPENTERM attempts to open the device referenced by A264X
to display VPLUS forms and accept their associated input. For example:
:FILE A264X; DEV=28 :RUN ENTRY.PUB.SYS
|
causes logical device 28 to be opened by VOPENTERM, and subsequent screen displays by VSHOWFORM appear on LDEV 28. In this example, LDEV 28 must
be a logged off terminal in an available state. Applications can
make use of this feature by using the termfile parameter
of VOPENTERM and a file equation. If the second parameter to VOPENTERM contained the value TERMINAL, the following file equation will cause logical device
28 to be opened for forms display:
Trace and abort messages will be displayed to the command
terminal — the one which initiated the application. This
would be the main reason to use this feature as abort messages are
frequently impossible to read because they are displayed in the unprotected
fields of a VPLUS application.
The second file equation which VPLUS searches for is FORMLIST.
The VPRINTFORM intrinsic uses FORMLIST to list forms (as in ENTRY).
FORMSPEC also uses FORMLIST for the LIST command. FORMLIST defaults to the system printer.
If, however, the user wishes to save the list file on disc, the
following file equation does just that, creating a file named FORMLIST
containing the form listing.
:FILE FORMLIST; DEV=DISC;SAVE
|
If your system has both a page printer and a line printer
(default), the file equation:
sends the form listing to the page printer.
The third file equation which VPLUS uses deals with a summary
listing of the forms file from batch mode FORMSPEC. Batch mode prints
to a file named FORMOUT. A file equation for FORMOUT can use the
same parameters as discussed for the file FORMLIST.
The LIST command and the batch mode FORMS command print a maximum of 60 lines per page.
This maximum may be altered by setting the JCW.
FORMSPECLINESPERPAGE For example, the MPE command :SETJCW FORMSPECLINESPERPAGE=45
|
sets the maximum number of lines per page to 45. This JCW
is useful when more white space is desired at the bottom of the
page, or when special paper is used.
FORMSPECLINESPERPAGE must be in the range 1 to 150. Any value outside
this range will cause a LIST command to fail, and will cause batch mode FORMSPEC
to halt with the error message.
FORMSPECLINESPERPAGE must be between 1 and 150
|
No lines will be printed in either case, to ensure that FORMSPEC
does not waste paper printing a listing of FORMS reference in an
unwanted format.