The raprtps perl script is designed to work with the RAPRTPS COBOL program to produce a postscript formatted rental agreement. This script is designed to allow easy customization of the rental agreement for our clients without having to make COBOL program changes. RAPRTPS (COBOL) sends NAME=VALUE pairs of data about the rental agreement to raprtps (the perl script), which in turn changes those to postscript definitions.
Note: in this manual page, whenever CLIENT is mentioned, it means the CARS+Internet client code, e.g. HTZAUS. Also, when searching for a file, it will first try the client code and then it will try the word "default".
The files mentioned can exist in two different directories: The SHELL directory or the ps directory. If a file exists in both directories, the file in the ps directory will be used.
If an executable script called raprtps-CLIENT is found, then that script will be called and the rest of the raprtps functionality will not be used.
Postscript files are organized by having a prolog (which is meant to be definitions of procedures to run) followed by the data and the instructions to print the page(s). This script honors that separation and allows programmers with different levels of postscript knowledge to contribute to the rental agreement.
To allow for flexibility, the logic can be split up between perl and postscript. The perl script, raprtps-CLIENT-STATUS-logic.pl, can contain several optional subroutes that raprtps will call at the appropriate time.
This is the order that data is produced for the postscript file:
Some logic is easier to code in perl than in postscript, so the logic.pl script makes it easy to do that. The script is made up of one or more subroutines. Each of the subroutines has access to the $data hash, which is made up of the data read from the NAME=VALUE pairs of data from COBOL. The subroutines may add, remove or change the data. The data is output just before the before_final subroutine.
The $data hash may contain array and hash references and those will be turned into postscript array and dictionaries respectively.