HP3000-L Archives

February 1997, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Duane Percox <[log in to unmask]>
Reply To:
Duane Percox <[log in to unmask]>
Date:
Tue, 11 Feb 1997 18:56:55 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
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/qwebs
http://www.qss.com/faq3k     http://www.qss.com/qsdk

ATOM RSS1 RSS2