Cybersecurity
DevOps Cloud (ADM)
IT Operations Cloud
How can you detect if a printer is on or off when running a COBOL program on a Windows platform?
This can be done using the WIN$PRINTER routine and specifying the WINPRINT-GET-PRINTER-STATUS op-code. There is a sample program called prndemox.cbl that demonstrates the use of the WIN$PRINTER routine.
It can be found the Sample sub-directory where ACUCOBOL-GT is installed, e.g.:
C:\Program Files\Acucorp\Acucbl800\AcuGT\sample\prndemox.cbl
It requires 4 copybooks:
acugui.def
winprint.def
fonts.def
crtvars.def
It is also attached to this KB Item.