Re: Help for test the printer
Posted in 1991
Path: emory!samsung!nstar!ka3ovk!irscscm!bogart!mfaurot From: mfaurot@bogart.uucp (Michael Faurot) Newsgroups: comp.databases.informix Summary: Why not let the Unix spooler handle it? Message-ID: <1991Dec21.173718.20202@bogart.uucp> Date: 21 Dec 91 17:37:18 GMT References: <4810@mtecv2.mty.itesm.mx> Organization: ism:c:m/xo In article <4810@mtecv2.mty.itesm.mx> cluis@mtecv2.mty.itesm.mx writes: > > Has anybody proved or has been working on testing the printer to know > its status to manage it within C language or some other language ? How > can I handle it ? I'm working within UNIX in a 4gl Enviroment (INFORMIX) > which can make C calls and I need to send reports to the printer but > before, I must check the printer status (e.g. Check for paper, Check > for the power on, and so on ; and if the report reaches a commit status, > the printer let me know) with the C language. I'm not sure I really understand why you would need to check on the status of the printer, you didn't really elaborate on this, but printer "handling" is usually done by the Unix spooler. Depending on what sort of machine and Unix variant you're using the print spooler command is usually something like lp, lpr or print (for those weird AIX machines :-) ). If your printer has been properly connected to your Unix machine, the spooler will intelligently handle when the printer runs out of paper, is not powered on, etc. By "intelligently handle" I mean that the spooler will stop sending output to the device until the problem has been resolved by a person. Why not just have your 4GL program pipe it's output to the local print spooler? -- +--------------------+-------------------------------------------------------+ | Michael Faurot | Domain: mfaurot@bogart.UUCP | | ------- ------ | UUCP: ...uunet!media!ka3ovk!irscscm!bogart!mfaurot | +--------------------+-------------------------------------------------------+ | Fax: 202-927-3999 | The real problem is not whether machines think | | Tel: 202-927-2896 | but whether men do. --B.F. Skinner | +--------------------+-------------------------------------------------------+