LANSA for Windows Printing Enhancement to direct output to a file

Date:2 May 1997
Product/Release:LANSA for Windows
Abstract:LANSA for Windows reports can be directed to a file rather than just to a printer
Submitted By:LANSA Technical Support
Last Review:November 2010

The ability to keep the results of printing a report in an RDML function in a file, instead of them being simply sent to the printer port is commonly required. This allows subsequent modification by a word processor, or backup after printing etc.

In Release 6.5 and earlier, LANSA-produced reports were created in a temporary file, then copied to the printer port specified in the PRTR= parameter of the X_RUN command when the report was closed. The temporary file was then deleted. What was required was a way to keep this temporary file for subsequent modification.

From Release 7.0, this is implemented by doing the following:

  • Use the special value in the X_RUN PRTR= parameter of *PATH. This indicates that reports are to be directed to a file rather than to a printer port.
  • Use the new X_RUN argument PPTH= which is the fully qualified directory for printer files when PRTR=*PATH. The default for this parameter would be x_lansa\x_ppp on the DRIV= path where ppp = current partition.
  • When the printer file is opened, if PRTR=*PATH, rather than creating a temporary file to hold the report details, it opens a new file in the PPTH= directory. The name of the file will be fffffff.nnn where fffffff = function name (valid file name form and lowercase) and nnn = next consecutive number for this function.

For example, an RDML function called PCXDEMO1 might have three reports. These reports would produce files called PCXDEMO1.001, PCXDEMO1.002 and PCXDEMO1.003 in the PPTH= directory. If the same function was run again it would produce reports called PCXDEMO1.004, PCXDEMO1.005 and PCXDEMO1.006 in the PPTH= directory.