Print to a file

[Autolink] Menu

To print to a file bypassing the prompt for the filename you can create a new port in your OS2SYS.INI file:

 
/* add an output file port into OS2SYS.INI                            */
  call RxFuncAdd "SysIni", "RexxUtil", "SysIni"
     call SysIni "SYSTEM", "PM_SPOOLER_PORT", "c:\prtout.prn",,
           ";" || "00"x

After the execution of this little program you can assign the newly created port to any printer object.

Note: Every new print output overwrites the existing file - you can't append the output to the file. Well, at least I haven't found a way to do this.