Kevin asks:
>I am looking for an intrinsic that I can call from a COBOL program
>to determine if a printer device exists. We need to allow our users to
>enter a device name on a view form. Does anyone know of such a beast?
Here are some ideas:
1. using hpcicommand: file x;dev=dev_name
you will get an error if dev_name doesn't exist. But this doesn't
tell you if its a printer device.
2. using hpcicommand: showdev dev_name > x
open x and parse the results
3. use hpfopen or fopen to open a file on this device. If you get an
error you can use fcheck to see if it was because the device doesn't
exist. I don't know what happens if you fclose the file without writing
anything. Worst case is you have an empty spool file.
Hope these help!
Duane Percox ([log in to unmask] v/415.306.1608 f/415.365.2706)
http://www.qss.com/http://www.qss.com/qwebshttp://www.qss.com/faq3khttp://www.qss.com/qsdk