|
|
HP Data Entry and Forms Management System (VPLUS) Reference Manual: HP 3000 MPE/iX Computer Systems > Appendix L A Programmer's Guide to VPLUSVPRINTSCREEN 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.
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. VPRINTSCREEN records the contents of the current screen to an off-line list device. A documentation option allows formatting for printing to a laser printer (See Modes of Operation). A VPLUS supported terminal is required during execution. TDP is required for the laser printer output.
A possible implementation of this feature would be to define a function key which is available to the user for printing the screen contents in any transaction. This feature would be useful for providing immediate output of documents and data during production. This new intrinsic is demonstrated with the program VPRTDEMO. See the section titled "Viewing the VPRINTSCREEN Demo" in this note for directions on obtaining the demo. VPRINTSCREEN operates in two modes; normal and documentation. Both of these modes are discussed in detail below. This is the default calling mode of VPRINTSCREEN. When called, the value is the PRINTFILNUM word of the COMAREA is used to determine the list device. If the calling program opens the list file, it must supply the file number of this file in PRINTFILNUM. VPRINTSCREEN opens the list file with the formal and actual file designator FORMLIST, assigns it to the device class LP, and specifies its length as 80 characters. This is equivalent to using the file equation:
A user may change any of these characteristics with a :FILE command. It is recommended that VPRINTSCREEN and VPRINTFORM not be used together within the same program. Since the same list file is used for both listings, output from the two calls will be intermixed. Another visible difference between VPRINTFORM and VPRINTSCREEN is that VPRINTFORM gives you the option to underline fields. This option is NOT available with VPRINTSCREEN (LP mode). A PAGE EJECT is performed each time VPRINTSCREEN is called (at the completion of the print operation). The output provided in this mode of operation is intended for manual writers and/or programmers who are familiar with TDP. The user must already have TDP on their system or must purchase it to use VPRINTSCREEN in this mode. In documentation mode, VPRINTSCREEN in conjunction with TDP, provides the capability to print screen contents on a laser printer (HP2680A and HP2688A). With this more, borders, field highlighting (other than color), alternate character sets, and active function keys are captured and converted to the appropriate font for printing on the laser printer. Documentation node is enabled by setting a JCW before running the program:
When VPRINTJCW is set to "1", the list file, FORMLIST is NOT opened. Instead, a temporary ASCII disc file, EPOCLIST, is created (or appended to, if it already exists). This file can be saved and renamed on completion, and then input to TDP and "finaled". A documenter can also add text to the file, or have a separate file, and use the TDP "include" statement to access the screens. (Refer to the TDP Reference Manual for a detailed discussion on USE and INCLUDE files). In order to print the forms to a laser printer, an environment file must be created. (See the IFS/3000 Reference Guide). We have supplied sample environment files which can be used if the user does not already have his/her own files. If other environment files are used, they must include the font ids shown under LIMITATIONS> The supplied files are:
By default, EPOCLIST uses the VSETUP file to reference the supplied environment files. These files must be accessible by TDP before EPOCLIST can be printed. If a different environment file is used, EPOCLIST must be modified to reference the appropriate environment file. In addition, the font definitions from VENV80 and VENV88 must be included in the environment file used. (Refer to the fonts listed in the Limitations section). Following are the steps involved to print the entire contents of EPOCLIST to a laser printer:
Instead of printing the screens out separately, you may want to include them into an existing TDP file. A special file, VEPOCUSE, is provided to facilitate the user in this task. The VSETUP file must be included as one of the first statements of your TDP document file. It will set up the reference to the correct environment file necessary for printing the screens in EPOCLIST.
The first step is to separate the screens in EPOCLIST. VEPOCUSE can be used to do this by following these steps:
It is recommended that the screen files are "included" into the file, because EPOCLIST has a record size of 168 bytes, and most document files are set to 80 bytes.
The new VPLUS intrinsic, VPRINTSCREEN, can be demonstrated with the program VPRTDEMO. You can simply run VPRTDEMO and specify a forms file name. The application will present the forms in alphabetical order and call the VPRINTSCREEN intrinsic when the user selects the PRINT function key, F3. At the beginning of execution, the user will have the option to automatically print all forms in the forms file. Several sample and demo files have been supplied as examples for the user. They are contained on the installation tape in the HPPL89 account and HP32209 group. They should be restored to a local group and account. Some name modifications may be necessary (see below).
If you answered "Y" to the automatic print prompt, the forms will be displayed and printed in alphabetic order. At completion, you will have EPOCLIST. If the VPRINTJCW is not set, then a FORMLIST file will be created. If manual print mode was selected, then the first form in alphabetic order is displayed. If local function keys were defined for the form, then these keys will be displayed. However, the action performed by VPRTDEMO when a key is selected is defined below:
|
|