Skip to main content

Receive Job Subcommands

These commands are processed when the line printer daemon has been given the receive job command. The daemon will continue to process commands until the connection is closed.

After a subcommand is sent, the client must wait for an acknowledgement from the daemon. A positive acknowledgement is an octet of zero bits. A negative acknowledgement is an octet of any other pattern.

LPR clients SHOULD be able to sent the receive data file and receive control file subcommands in either order. LPR servers MUST be able to receive the control file subcommand first and SHOULD be able to receive the data file subcommand first.

6.1 01 - Abort job​

Command code - 1
+----+----+
| 01 | LF |
+----+----+

No operands should be supplied. This subcommand will remove any files which have been created during this "Receive job" command.

6.2 02 - Receive control file​

+----+-------+----+------+----+
| 02 | Count | SP | Name | LF |
+----+-------+----+------+----+
Command code - 2
Operand 1 - Number of bytes in control file
Operand 2 - Name of control file

The control file must be an ASCII stream with the ends of lines indicated by ASCII LF. The total number of bytes in the stream is sent as the first operand. The name of the control file is sent as the second. It should start with ASCII "cfA", followed by a three digit job number, followed by the host name which has constructed the control file. Acknowledgement processing must occur as usual after the command is sent.

The next "Operand 1" octets over the same TCP connection are the intended contents of the control file. Once all of the contents have been delivered, an octet of zero bits is sent as an indication that the file being sent is complete. A second level of acknowledgement processing must occur at this point.

6.3 03 - Receive data file​

+----+-------+----+------+----+
| 03 | Count | SP | Name | LF |
+----+-------+----+------+----+
Command code - 3
Operand 1 - Number of bytes in data file
Operand 2 - Name of data file

The data file may contain any 8 bit values at all. The total number of bytes in the stream may be sent as the first operand, otherwise the field should be cleared to 0. The name of the data file should start with ASCII "dfA". This should be followed by a three digit job number. The job number should be followed by the host name which has constructed the data file. Interpretation of the contents of the data file is determined by the contents of the corresponding control file. If a data file length has been specified, the next "Operand 1" octets over the same TCP connection are the intended contents of the data file. In this case, once all of the contents have been delivered, an octet of zero bits is sent as an indication that the file being sent is complete. A second level of acknowledgement processing must occur at this point.