Skip to Content

How do I print to a spooler in Unix?

Estimated Reading Time: 1 Minutes

Question:

Currently, under ACUCOBOL, I open a disk file using a working storage variable name. That variable holds a generic name which can be found in the configuration file. That generic name translates into a spooler command (e.g. "PRINTERHP -P lp -s -oraw -dhplaser").
How does isCOBOL handle filename expansion, and can I keep my files defined as SELECT ... from DISK? Are there any other changes I need to make to my ACUCOBOL-GT programs to get the same print behavior?

Answer:

Accessing printers on a Linux machine works the same in isCOBOL as it does in ACUCOBOL-GT. You won't need to make any changes to your code.

For filename expansion, you should set the following variable in your properties file:

   iscobol.file.env_naming=1

How do I print to a spooler in Unix?