HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)

674 AppendixL
A Programmer’s Guide to VPLUS
VPRINTSCREEN Intrinsic
VPRINTSCREEN Intrinsic
A new intrinsic, VPRINTSCREEN, provides the capability to print the entire contents of a
terminal screen during VPLUS execution. Currently, VPLUS provides the intrinsic
VPRINTFORM which prints the current form with the data contained in the form data buffer;
function keys, appended forms, line drawing characters, etc., are not printed. With
VPRINTSCREEN, these limitations no longer exist.
The largest demand for this functionality has been from documentation and training
departments. In the past, the only method for obtaining a complete “snapshot” of a screen
was through the use of the internal printers available on some HP terminals.
There are two approaches a user can take to produce copies of VPLUS screens. One is to
incorporate the use of VPRINTSCREEN into an end-user application so that screen images
can be captured at run time. This allows actual screen and data to be captured in
production mode. The other method is to develop a simple utility which would only be used
to produce hard copies of screens. The utility should allow data to be entered into the
screens before calling VPRINTSCREEN to produce the image. The advantage of this method
is that it removes the overhead of using VPRINTSCREEN from the application, but still
provides a mechanism for including reproductions of the screens and data in product
literature.
The demo program, VPRTDEMO, is an example of this type of utility. Refer to the section
“Viewing the VPRINTSCREEN Demo” for specifics on how to access and use the demo
program. Any user interested in the VPRINTSCREEN intrinsic should use this demo with
existing forms before attempting to modify existing applications.
The remainder of this article will concentrate on the process of calling VPRINTSCREEN from
a user program. This procedure was implemented using the Pascal heap procedures to
perform stack allocation. This introduces a high risk of conflict for applications which use
the DLSIZE intrinsic for stack allocation. In the case of VPLUS, DLSIZE is used by the
existing intrinsics when the application is written in COBOL, FORTRAN/66, or SPL.
However, since VPRINTSCREEN always uses the heap procedures, applications written in
one of these specified languages must follow two rules when calling VPRINTSCREEN.
1. The language id in the COMAREA must be set to 5
2. The INTRINSIC calling mechanism must be used when calling the VPLUS intrinsics
from the main and all interacting parts of the application. For example, with COBOL
the application must use:
CALL INTRINSIC <intrinsic name>
Refer to Appendix E of the VPLUS Reference Manual, the COBOL Reference Manual and
the Pascal Reference Manual for more information on these calling mechanisms.
For applications which use a language-id of 5 in the VPLUS COMAREA (Pascal,
FORTRAN/77, HPBUSINESS BASIC), VPLUS uses the HEAP procedures for stack
allocation. The new intrinsic can be called in the standard format from an application of
this type.