This document covers the following topics:
Print a document.
This subprogram is the same as Z-PRI11 with the one exception that the parameter ISN uses the format P10.
The document must be in a printable format (i.e. document format Txt or Cnf).
When you print a Cnf document, the printed version shows all Con-form instructions. A Cnf document is not formatted (see Z-PRI11F, Z-PRI11G or Z-PRI11Y for this function).
When you access Con-nect from a PC, you can also print the document on the printer with is connected to your PC.
The calling routine should contain a printer definition of the following form:
IF PRINTER-TID EQ 'PC' DEFINE PRINTER(#OUT=5) ELSE DEFINE PRINTER(#OUT=5) OUTPUT PRINTER-TID END-IF
The following rules apply:
If Printer-TID equals binary zero (format B8), DEFINE PRINTER is not executed.
If Printer-TID equals blank or PC, DEFINE PRINTER (5) is executed regardless of the current device. There is one exception: if Printer-TID equals PC and *DEVICE does not equal PC, return code 5 is issued and the routine ends.
Any other value of Printer-TID issues the following, regardless of the current device:
DEFINE PRINTER (5) OUTPUT PRINTER-TID
When you print a document which is currently stored in the Inbasket file New, the corresponding address list is updated so that the reception status of the document indicates that it has been read. Additionally, the document is moved from the file New to the file Opened.
Successful termination of Z-PRI11X always results in an END TRANSACTION. You are not able to control transaction handling.
Parameter | Format | In | Out | Remarks |
---|---|---|---|---|
Return-code | N2 | X | ||
Cabinet | A8 | R | The cabinet in which the document is to be printed. | |
Password | A8 | R | The password of the above cabinet. | |
Document-name | A32 | R* | The name of the document to be printed. Either Document-name or ISN, not both. | |
ISN | P10 | R* | The ISN of the document to be printed. Either ISN or Document-name, not both. You can invoke Z-DIS11X prior to this subprogram to obtain the ISN for the desired document. | |
Printer-TID | A8 | R | The terminal ID number, LU number or comparable terminal destination for the printer which is to be used. | |
Page-length | N3 | O | The number of lines per printed page. Values 1 to 250. Default: 60. |
00 | Success |
02 | Invalid cabinet name or - in batch mode only - locked cabinet |
03 | Password incorrect |
04 | ISN was not found |
05 | TID/LU device is not a personal computer |
08 | Supply either ISN or name, not both |
09 | ISN does not point to correct object |
51 | Invalid name |
53 | Requested object does not exist |
57 | Document contains no text |
80 | Document is not correctly structured |
88 | Document is not in correct format for printing |
90 | Incorrect page width - must be 1 through 250 |
Z-0711A
Z-120
Z-122
Z-123
Z-165
Z-175
Z-177
Z-194
Z-197
Z-222
Z-223
Z-400
Z-401
Z-1200&0
0010 * 0020 * Example program to print a document. 0030 * 0040 DEFINE DATA 0050 LOCAL 0060 1 RETURN-CODE (N2) 0070 1 CABINET (A8) 0080 1 PASSWORD (A8) 0090 1 DOCUMENT-NAME (A32) 0100 1 ISN (P10) 0110 1 PRINTER-TID (A8) 0120 1 PAGE-LENGTH (N3) 0130 * 0140 END-DEFINE 0150 * 0160 RESET RETURN-CODE 0170 * 0180 MOVE 'TID ' TO PRINTER-TID 0190 * 0200 IF PRINTER-TID EQ 'PC' 0210 DEFINE PRINTER(#OUT=5) 0220 ELSE 0230 DEFINE PRINTER(#OUT=5) OUTPUT PRINTER-TID 0240 END-IF 0250 * 0260 FORMAT(#OUT) PS=250 LS=129 0270 * 0280 MOVE 'CABINET' TO CABINET 0290 MOVE 'PASSWORD' TO PASSWORD 0300 MOVE 1234567890 TO ISN 0310 * 0320 CALLNAT 'Z-PRI11X' 0330 RETURN-CODE 0340 CABINET 0350 PASSWORD 0360 DOCUMENT-NAME 0370 ISN 0380 PRINTER-TID 0390 PAGE-LENGTH 0400 * 0410 IF RETURN-CODE EQ 0 0420 WRITE 'Document was printed' RETURN-CODE 0430 ELSE 0440 WRITE 'Return code ' RETURN-CODE 0450 END-IF 0460 * 0470 END