HP 3000 Manuals

VPRINTSCREEN [ HP Data Entry and Forms Management System (VPLUS/V) ] MPE/iX 5.0 Documentation


HP Data Entry and Forms Management System (VPLUS/V)

VPRINTSCREEN 

Prints the entire contents of a terminal screen to an offline list device
or laser printer during VPLUS execution.

Syntax 

             VPRINTSCREEN {comarea, readsize}

Parameters 

comarea          If not already set, the following comarea items must be
                 set before calling VPRINTSCREEN:

                 cstatus          Set to zero

                 comarealen       Set to the total number of two-byte
                                  words in comarea.

                 printfilenum     Set to the file number of the list file
                                  to which the form is printed.  If set
                                  to 0, VPRINTSCREEN opens the device
                                  "LP" as the list file and sets
                                  printfilenum to the file number of the
                                  opened list file.

                 VPRINTSCREEN may set the following comarea items.

                 printfilenum     If VPRINTSCREEN opened the list file,
                                  set to the file number of the opened
                                  file.

                 cstatus          Set to a nonzero value if call is
                                  unsuccessful.

                 filerrnum        Set to the MPE error code if an MPE
                                  file error is encountered.

readsize         Two-byte integer, reserved for system use.  Must be set
                 to 0.

Discussion 

This intrinsic provides the capability for printing the current screen
display with function keys, line drawing characters and appended forms,
as well as the data on the screen.  It differs from VPRINTFORM, which is
limited to printing only the data in the form data buffer.  However,
VPRINTFORM offers the option of underlining fields, which VPRINTSCREEN in
LP mode does not.

The programmer can produce copies of VPLUS screens in either of two ways:
incorporating VPRINTSCREEN into an application so that screen images can
be captured at run-time with their data, or developing a simple utility
that allows data to be entered into the screens before calling
VPRINTSCREEN to reproduce them.  The utility has the advantage of
removing the overhead caused by VPRINTSCREEN from the application, while
still providing a way to reproduce screens and data for product
literature.

VPRINTSCREEN always uses the Pascal HEAP procedures to perform stack
allocation.  This introduces the risk of conflict for programs written in
COBOL, FORTRAN/66 or SPL, because the existing intrinsics would use
DLSIZE for stack allocation in these cases.  Applications written in
these languages must, therefore, follow two rules when calling
VPRINTSCREEN. They are:

   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 this manual, and to the COBOL and Pascal reference
manuals, for more information on calling mechanisms.

For applications that use a language id of 5 in the VPLUS comarea,
including Pascal, FORTRAN/77 and HPBUSINESS BASIC, VPLUS uses the HEAP
procedures for stack allocation, so VPRINTSCREEN can be called in the
standard format.

The programmer may implement this feature by defining a function key that
allows the user to print the screen contents at any time.  This would be
useful for providing immediate output during production.

Modes of Operation 

VPRINTSCREEN operates in two modes, normal and documentation mode.  A
VPLUS supported terminal is required for execution of this intrinsic.

Normal Mode 

This is the default calling mode for VPRINTSCREEN. When called, the value
in the printnumfile 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 printfilenum 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:

        :FILE FORMLIST;DEV=LP;REC=-80

The user may change any of these characteristics with a :FILE command.


NOTE It is recommended that VPRINTSCREEN and VPRINTFORM not be used in the same program. Since the same list is used for both listings, output from the two calls will be intermixed.
Each time VPRINTSCREEN is called, a PAGE EJECT is performed at the end of the print operation. Documentation Mode You require TDP in order to use VPRINTSCREEN in this mode. VPRINTSCREEN, in conjunction with TDP, provides the capability to print screen contents on a laser printer (HP2680A or HP2688A). In this mode, field highlighting other than color, borders, alternate character sets and active function keys are captured and converted to the requisite font for printing on the laser printer. Documentation mode is enabled by setting a JCW before running the program. It is: :SETJCW VPRINTJCW=1 When VPRINTJCW is set to 1, the list file FORMLIST is NOT opened. Instead, a temporary file called EPOCLIST is created (or appended to, if it already exists). EPOCLIST can be saved and renamed on completion of the screen capture, then input to TDP and 'finaled'. The user can add text to the file or include it in a separate TDP file. Refer to the TDP Reference Manual (Part No. 36578-90004) for more information on use and include files. In order to print the forms on a laser printer, an environment file must be created (if it does not already exist). Refer to the IFS/3000 Reference Guide (Part No. 36580-90001) for more information. The environment files for the HP2680 and HP2688 laser printers are VENV80 and VENV88 respectively. All environment files must include the font ids listed under "Limitations" below. EPOCLIST uses VSETUP, a TDP include file, as the default file to reference the environment files, which must be accessible to TDP in order for EPOCLIST to be printed. If an environment file other than VENV80 or VENV88 is used, EPOCLIST must be modified to reference this file, and the font definitions from VENV80 and VENV88 must be included in it (see "Limitations" below). Printing Screens from TDP. To print the contents of EPOCLIST to a laser printer, follow these steps: 1. :PURGE (or :RENAME) EPOCLIST 2. :SETJCW VPRINTJCW=1 3. :RUN <your application program> 4. Use the print function wherever it is available to save the screen contents, including data, in EPOCLIST. 5. Exit the application. 6. :SAVE EPOCLIST 7. :RENAME EPOCLIST, <new name> If you do not rename EPOCLIST, the output generated the next time the application is run will be appended to the existing file. 8. :RUN TDP.PUB.SYS 9. Text in the file and execute the command, "Final from <new name> to *HP2680" (or HP2688) The screens will be printed out, one per page. Step 8 and 9 may be specified in a job stream. Merging Screens with a TDP File. You can include screens in an existing TDP document easily by using the file VEPOCUSE, a TDP use file that divides EPOCLIST into separate files containing one screen per file. The VSETUP file must be included as one of the first statements of the TDP document so that the correct environment file is referenced for printing the screens. Follow these steps: 1. :RUN TDP Clear the workspace. 2. :USE VEPOCUSE Answer the prompts, and enter a PREFIX. VEPOCUSE separates the old file into new files, each containing one screen. 3. Text in the TDP document and include each screen file in the correct place. It is recommended that screen files be included as separate, individual files in a document, rather than being incorporated directly into the text, because EPOCLIST has a record size of 168 bytes and most document files are set to 80 bytes. Limitations The following limitations pertain to the use of VPRINTSCREEN. * Procedure calls must be modified in order to call the intrinsic from a language that does not use a VPLUS language id of 5 in the comarea, for example, COBOL, SPL and FORTRAN/66. * It uses additional stack resources. * Native Language support is NOT available for VPRINTSCREEN. To print a screen in another language, you require a LOCALIZED environment file which maps to the following fonts: c = full bright g = half-bright inverse video d = normal l = line-draw m = math * The current environment files do not distinguish between full bright and half bright, but the code is set up to do so. * Screen images cannot be scaled; fonts come in one size only. * The maximum TDP record size is 168 characters. A single line in a screen may easily exceed this limit if it contains may escape sequences, in which case the line may be truncated. * TDP macros 5-9 are used to minimize truncation, but some screens will reach the limit anyway. If you use your own macros 5-9, some inconsistencies may appear when text and screens ar merged. * TDP may indicate that errors have occurred when, in fact, there are none. The most common error messages are: "Unrecognizable command" and "n characters have been truncated". Example This is a sample EPOCLIST file. *>>DATE: FRI, May 3, 1987, 11:19AM if main in hpvsetup.pub image 28 need 28 >>>>>>screen formatting commands<<<<<< *>>END VPRINTSCREEN B.05.00 _________________________________________________________________________________ | | | | | SAMPLE SCREEN v.FF | | | | This is a sample form to demonstrate the VPRINTSCREEN intrinsic. | | | | ---------------------------------------------------------------- | | | | | | | Name: [ ] | | | | | | | | Street Address: [ ] | | | | | | | | City: [ ] State: [ ] | | | | | | | | Phone: [ ] | | | | | | | | | | | ---------------------------------------------------------------- | | | | ADD CHANGE DELETE REVIEW HELP PRINT EXIT | | | _________________________________________________________________________________ Figure 6-4. Sample EPOCLIST Screen from TDP


MPE/iX 5.0 Documentation