Documentation for formutil


formutil is a collection of routines for working with form printer modules. Utilities are provided for selecting, and running form printer modules.

formutil hides the details of how the form printer modules are maintained. Therefore, application programs should be using formutil services as much as possible to limit the specifics of manipulating the data representing form printer modules within the boundaries of this utility.


Services Directory

The following is a catalog of the availble services with a brief discussion of what the service provides and the parameters available to it. Some things you should know about when reading the service specifications are:

DEFINE [NEW]
This service allows you to set up the stream and related things for selecting a form printer module and printing.

STREAM
This service allows you to get the name of the stream used by the utility.

OPEN [opened]
This service allows you to open the stream (Preprocessor is broken). The opened parameter tells whether the OPEN was sucessful. In interactive mode this will display an ALERT-BOX in addition to returning a false opened value.

CLOSE
This service allows you to close the stream (Preprocessor is broken).

FORMDEF
This service allows you to get the name of the form-def buffer used by the utility.

FORMBLDG
This service allows you to get the name of the form-bldg buffer used by the utility.

SET FORM form-name [setSuccessful]
This service allows you to load the form-def buffer corresponding to the form-name you pass. The sucess of the operation will be returned if the optional parameter is provided. In interactive mode, if the SET fails, the user will also get an ALERT-BOX.

SET INTERACTIVE useInteractive
This service determines whether the utility is being run in interactive mode. The default is true (interactive).

GET LINES
This service allows you to get the # of lines that can be printed on the current form. This is only valid AFTER using prntutil QUERY-USER.

GET CHARS
This service allows you to get the # of characters that can be printed on the current form. This is only valid AFTER using prntutil QUERY-USER.

GET FORM_LIST formList
This service is used to get a list of form descriptions and ids. The list is in the format: formDesc1{&PARAM_DELIM1}formId1{&PARAM_DELIM}formDesc2{&PARAM_DELIM1}formId2 ...

LOAD form-name building-buff error-num
This service allows you to load the utility form-bldg buffer with a record matching the form name and building buffer you pass (the building buffer may not be available, if the form is a district form). The error number you pass must refer to an error message defined in error-text used in case no form-bldg records could be found at all (0 is passed back if everything went fine). To be used only in interactive mode. In non-interactive mode SET FORM followed by non-interactive SELECT will accomplish everything normally accomplished though a LOAD.

SELECT building-buff [formid] error-num
In interactive mode this can be used without the formid to allows you to select which form to use via a mini-lister. If there was only form-bldg record that matched the utility form-def buffer, then the form-bldg record is selected silently. The building buffer you pass may not be available, if the form is a district form. The error number you pass must refer to an error message defined in error-text used in case no form-bldg records could be found at all (0 is passed back if everything went fine). When the formid option is used then this will select the form specified by formid. The formid must match a form id returned through GET FORM_LIST.

VERIFY error-num
This service allows you to make sure the printing module is not blank and does exist. The error number you pass must refer to an error message defined in error-text used in case the form printer module was blank (0 is passed back if everything went fine).

INIT
This service allows you to set up the printing process with data from form-bldg buffer.

ALIGN-MODE RUN user-cancelled [fill-in-text]
This service allows you to perform alignment mode. Since alignment mode is an interactive process, you will know whether the user cancelled printing. fill-in-text is used to word the alignment mode frame that is displayed on the screen.

ALIGN-MODE PRINT print-form
This service allows you to know whether an alignment form needs to be printed.

STATUS SET print-result
This service allows you to access the status about the outcome of running the form printer module, and indicate what happened during printing. This outcome can be one of the following:

STATUS GET print-result
This service allows you to find out what happened during printing. The various outcomes are covered in the STATUS SET service.


Utility Upgrades

November 10, 1999:

January 17, 1996:

October 30, 1995: