Answer:

Run
  lpc -Dnetwork,1 release lp  [jobnum] >/tmp/log 2>&1 

You will see the command you need in the /tmp/log file in hte
network debugging stuff.

The command has the foramat:

\006printer user command printer options

So this would be:

\006lp root release lp

It is even documented in the HOWTO...

Patrick

> From [EMAIL PROTECTED] Thu Jan 17 12:55:31 2002
> From: "Floyd Shackelford" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: lprng lpd remote command control operation
> Date: Thu, 17 Jan 2002 13:57:38 -0600
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_007F_01C19F5E.EC78B380
> Content-Type: text/plain;
>       charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
>
> this is my first time communicating to you, so let me say thank you very
> much for your work on lprng. it's a great product.
>
> i need help getting the lpc requests documented in section "19.8 LPC
> Requests" of the manual to work. if i make a non-modifying call (e.g. lpq or
> status), i get the expected results. if i use a modifying call (e.g.
> release), i get back the following response:
>
>    Printer: lp@redhat
>    lp@redhat: no
>
> Huh? it's telling me no! i admit i had to laugh at that reponse. i haven't
> had a computer tell me no in a very long time.
>
> My command string is as follows:
>
> \006lp@redhat root@redhat release lp 447
>
> where:
>
>   \006 is a single byte of value 6
>   lp is the printer spool name
>   redhat is the host name
>   447 is the job number
>
> here's what lpq shows me:
>
> [root@redhat LPRng]# lpq
> Printer: lp@redhat (dest lp@kyocera)
>  Queue: no printable jobs in queue
>  Holding: 1 held jobs in queue
>  Server: no server active
>  Status: job 'cfA427redhat.cmsdiginet.com' error 'aborting operations' at
> 11:55:25.126
>  Filter_status: no sync response from printer at 09:12:06.403
>  Rank   Owner/ID                  Class Job Files                 Size Time
> hold   root@redhat+447              A   447 /etc/hosts             169
> 11:56:10
>
>
> here's my printcap:
>
> lp:
> #  :lpd_bounce
>   :force_localhost
>   :as=|/usr/local/LinuxGateKeeper/LinuxGateKeeperPrintJobFilter.sh
>   :sd=/var/spool/lpd/%P
>   :mx=0
>   :mc=0
>   :sh
>   :lp=lp@kyocera
>   :done_jobs=5
> #  :filter=/usr/local/libexec/filters/ifhp
> #  :ifhp=model=hp4000
>
> lp:server
>   :lpd_port=515
>   :reuse_addr=1
>   :retry_econnrefused=1
>   :retry_nolink=1
>   :socket_linger=1
>   :remote_support=1
>   :originate_port=512 1023
>
>
> here's my java code that makes the request:
>
>   public String ReleaseJobOnHold(JobInfo jobInfo)
>     throws IOException
>   {
>     Connect();
>
>     OutputStream outputStream = _socket.getOutputStream();
>
>     // the control operation has the following format:
>     //   \006printer user command [options]
>     Write(outputStream,DO_CONTROL_OPERATION);  // \006
>     Write(outputStream,jobInfo._printerName + " ");
>     Write(outputStream,jobInfo._submittedByUserID + "@" +
> jobInfo._submittedByHost + " ");
>
>     // the release command has the following format:
>     //   release (printer[@host] | all) (name[@host] | job | all)*
>     String commandLine =
>              "release " +
>              jobInfo._printerName + " " +
>              String.valueOf(jobInfo._jobNumber);
> System.out.println("command="+commandLine);
>     Write(outputStream,commandLine);
>     Write(outputStream,LF);
>
>     // read the result
>     InputStream inputStream = _socket.getInputStream();
>     String inputLine = Read(inputStream);
>
>     Done();
>
>     return inputLine;
>   }
>
>
> how do i get LPRng to release the job?
>
> Regards,
>
> Floyd Shackelford
> 4 Peaks Technology Group, Inc.
> VOICE: 334.735.9428
> FAX:   916.404.7125
> EMAIL: [EMAIL PROTECTED]
> Acta non verba
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.312 / Virus Database: 173 - Release Date: 12/31/2001
>
> ------=_NextPart_000_007F_01C19F5E.EC78B380
> Content-Type: text/html;
>       charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=3DContent-Type content=3D"text/html; =
> charset=3Diso-8859-1">
> <META content=3D"MSHTML 5.50.4912.300" name=3DGENERATOR></HEAD>
> <BODY>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>this is my =
> first time=20
> communicating to you, so let me say thank you very much for your work on =
> lprng.=20
> it's a great product.</FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial></FONT></SPAN>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>i need help =
> getting the lpc=20
> requests documented in section "19.8 LPC Requests" of the manual to =
> work. if i=20
> make a non-modifying call (e.g. lpq or status), i get the expected =
> results. if i=20
> use a modifying call (e.g. release), i get back the following=20
> response:</FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial></FONT></SPAN>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>&nbsp;&nbsp; =
> Printer: <A=20
> href=3D"mailto:lp@redhat";>lp@redhat</A><BR>&nbsp;&nbsp; <A=20
> href=3D"mailto:lp@redhat";>lp@redhat</A>: no</FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial></FONT></SPAN>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>Huh? it's =
> telling me no! i=20
> admit i had to laugh at that reponse. i haven't had a computer tell me =
> no in a=20
> very long time.</FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial></FONT></SPAN>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>My command =
> string is as=20
> follows:</FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial></FONT></SPAN>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>\006lp@redhat =
> <A=20
> href=3D"mailto:root@redhat";>root@redhat</A> release lp =
> 447</FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial></FONT></SPAN>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial>where:</FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial></FONT></SPAN>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>&nbsp; \006 is =
> a single=20
> byte of value 6</FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>&nbsp; lp is =
> the printer=20
> spool name</FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>&nbsp; redhat =
> is the host=20
> name</FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>&nbsp; 447 is =
> the job=20
> number</FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial></FONT></SPAN>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>here's what lpq =
> shows=20
> me:</FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial></FONT></SPAN>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>[root@redhat =
> LPRng]#=20
> lpq<BR>Printer: <A href=3D"mailto:lp@redhat";>lp@redhat</A> (dest <A=20
> href=3D"mailto:lp@kyocera";>lp@kyocera</A>)<BR>&nbsp;Queue: no printable =
> jobs in=20
> queue<BR>&nbsp;Holding: 1 held jobs in queue<BR>&nbsp;Server: no server=20
> active<BR>&nbsp;Status: job 'cfA427redhat.cmsdiginet.com' error =
> 'aborting=20
> operations' at 11:55:25.126<BR>&nbsp;Filter_status: no sync response =
> from=20
> printer at 09:12:06.403<BR>&nbsp;Rank&nbsp;&nbsp;=20
> Owner/ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
> ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
> Class Job=20
> Files&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
> bsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
> Size Time<BR>hold&nbsp;&nbsp; <A=20
> href=3D"mailto:root@redhat+447";>root@redhat+447</A>&nbsp;&nbsp;&nbsp;&nbs=
> p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
> A&nbsp;&nbsp; 447=20
> /etc/hosts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
> sp;&nbsp;=20
> 169 11:56:10<BR></FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial></FONT></SPAN>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>here's my=20
> printcap:</FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial></FONT></SPAN>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>lp:<BR>#&nbsp;=20
> :lpd_bounce<BR>&nbsp; :force_localhost<BR>&nbsp;=20
> :as=3D|/usr/local/LinuxGateKeeper/LinuxGateKeeperPrintJobFilter.sh<BR>&nb=
> sp;=20
> :sd=3D/var/spool/lpd/%P<BR>&nbsp; :mx=3D0<BR>&nbsp; :mc=3D0<BR>&nbsp; =
> :sh<BR>&nbsp;=20
> :lp=3Dlp@kyocera<BR>&nbsp; :done_jobs=3D5<BR>#&nbsp;=20
> :filter=3D/usr/local/libexec/filters/ifhp<BR>#&nbsp;=20
> :ifhp=3Dmodel=3Dhp4000</FONT></SPAN></DIV>
> <DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial>lp:server<BR>&nbsp;=20
> :lpd_port=3D515<BR>&nbsp; :reuse_addr=3D1<BR>&nbsp; =
> :retry_econnrefused=3D1<BR>&nbsp;=20
> :retry_nolink=3D1<BR>&nbsp; :socket_linger=3D1<BR>&nbsp; =
> :remote_support=3D1<BR>&nbsp;=20
> :originate_port=3D512 1023&nbsp;<BR></FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial>&nbsp;</DIV></FONT></SPAN>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>here's my java =
> code=20
> that&nbsp;makes the request:</FONT></SPAN></DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial></FONT></SPAN>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>&nbsp; public =
> String=20
> ReleaseJobOnHold(JobInfo jobInfo)<BR>&nbsp;&nbsp;&nbsp; throws=20
> IOException<BR>&nbsp; {<BR>&nbsp;&nbsp;&nbsp; =
> Connect();</FONT></SPAN></DIV>
> <DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial>&nbsp;&nbsp;&nbsp;=20
> OutputStream outputStream =3D =
> _socket.getOutputStream();</FONT></SPAN></DIV>
> <DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial>&nbsp;&nbsp;&nbsp; // the=20
> control operation has the following format:<BR>&nbsp;&nbsp;&nbsp; =
> //&nbsp;&nbsp;=20
> \006printer user command [options]<BR>&nbsp;&nbsp;&nbsp;=20
> Write(outputStream,DO_CONTROL_OPERATION);&nbsp; // =
> \006<BR>&nbsp;&nbsp;&nbsp;=20
> Write(outputStream,jobInfo._printerName + " ");<BR>&nbsp;&nbsp;&nbsp;=20
> Write(outputStream,jobInfo._submittedByUserID + "@" + =
> jobInfo._submittedByHost +=20
> " ");</FONT></SPAN></DIV>
> <DIV>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial>&nbsp;&nbsp;&nbsp; // the=20
> release command has the following format:<BR>&nbsp;&nbsp;&nbsp; =
> //&nbsp;&nbsp;=20
> release (printer[@host] | all) (name[@host] | job | =
> all)*<BR>&nbsp;&nbsp;&nbsp;=20
> String commandLine=20
> =3D<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
> &nbsp;=20
> "release "=20
> +<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
> bsp;=20
> jobInfo._printerName + " "=20
> +<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
> bsp;=20
> String.valueOf(jobInfo._jobNumber);<BR>System.out.println("command=3D"+co=
> mmandLine);<BR>&nbsp;&nbsp;&nbsp;=20
> Write(outputStream,commandLine);<BR>&nbsp;&nbsp;&nbsp;=20
> Write(outputStream,LF);</FONT></SPAN></DIV>
> <DIV>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial>&nbsp;&nbsp;&nbsp; // read=20
> the result<BR>&nbsp;&nbsp;&nbsp; InputStream inputStream =3D=20
> _socket.getInputStream();<BR>&nbsp;&nbsp;&nbsp; String inputLine =3D=20
> Read(inputStream);</FONT></SPAN></DIV>
> <DIV>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial>&nbsp;&nbsp;&nbsp;=20
> Done();</FONT></SPAN></DIV>
> <DIV>&nbsp;</DIV>
> <DIV><SPAN class=3D440263519-17012002><FONT =
> face=3DArial>&nbsp;&nbsp;&nbsp; return=20
> inputLine;<BR>&nbsp; }<BR>&nbsp; <BR></DIV></FONT></SPAN>
> <DIV><SPAN class=3D440263519-17012002><FONT face=3DArial>how do i =
> get&nbsp;LPRng to=20
> release the job?</FONT></SPAN></DIV>
> <DIV><SPAN style=3D"FONT-SIZE: 10pt"><FONT face=3DArial=20
> size=3D3></FONT></SPAN>&nbsp;</DIV>
> <DIV><SPAN style=3D"FONT-SIZE: 10pt"><FONT face=3DArial =
> size=3D3>Regards,<BR><BR>Floyd=20
> Shackelford<BR></FONT><A href=3D"http://www.4peakstech.com/";><FONT =
> face=3DArial=20
> color=3D#000000 size=3D3>4 Peaks Technology Group, =
> Inc.</FONT></A><BR><FONT=20
> face=3DArial size=3D3>VOICE: 334.735.9428<BR>FAX:&nbsp;&nbsp; =
> 916.404.7125<BR>EMAIL:=20
> </FONT><A href=3D"mailto:[EMAIL PROTECTED]";><FONT face=3DArial =
> color=3D#000000=20
> size=3D3>[EMAIL PROTECTED]</FONT></A></SPAN></DIV>
> <DIV><SPAN style=3D"FONT-SIZE: 10pt">
> <P><FONT size=3D3><EM>Acta non verba</EM></FONT></P></SPAN></DIV>
> <DIV><FONT face=3DArial></FONT>&nbsp;</DIV></BODY></HTML>
>
> ------=_NextPart_000_007F_01C19F5E.EC78B380--
>
>

-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to