This document covers the following topics:
Format and print a Cnf or Int document. You can also use this subprogram to print a Txt document.
You must ensure that Con-form is available to the calling program.
This subprogram is the same as Z-PRI11I with the one exception that the parameter ISN uses the format P10.
When you mark the parameter Enclosures, all enclosures must be in a printable format (i.e. Txt, Cnf or Int). If one of the enclosures is not in a printable format, return code 88 is issued.
To reset the Con-form buffer after the formatted document has been printed, you must mark the parameter Reset-buffer.
When you access Con-nect from a PC, you can also print the formatted 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-PRI11Y 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. | |
From-page | N3 | O | When page breaks have been defined, you can specify at which page the formatted printout is to start. | |
To-page | N3 | O | When page breaks have been defined, you can specify at which page the formatted printout is to end. | |
Printer-profile | A32 | O | The name of the printer profile which is to be assigned to the printer. When you do not fill this parameter, a printer profile is not used. | |
Format-profile | A32 | O | The name of the formatting profile which is to be used. When you do not fill this parameter, a formatting profile is not used. | |
System-variables | A1 | O | If marked, the system variables are replaced with the appropriate values. | |
Enclosures | A1 | O | If marked, the enclosures are printed. The enclosures must have the format Cnf, Int or Txt. | |
Reset-buffer | A1 | O | If marked, the Con-form buffer is reset after all formatted documents have been printed. | |
Flags | ||||
Open-flag | L | O | If true, the printer is initialized before each formatted printout. If false, initialization is suppressed. Default: false. | |
Close-flag | L | O | If true, the printer is reset to its original state after each formatted printout. If false, resetting is suppressed. Default: false. | |
Message-flag | L | O | If true, Con-form messages are printed. If false, Con-form messages are suppressed. Default: false. | |
Main-printer-flag | L | O | If true, Con-form messages are sent to Natural report 0 (monitor). If false, Con-form messages appear in the formatted text. Default: false. Applies only, if the parameter Message-flag is true. |
00 | Success |
02 | Invalid cabinet name |
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 |
81 | Invalid formatting profile name |
82 | Requested formatting profile does not exist |
83 | Invalid printer profile name |
84 | Requested printer profile does not exist |
85 | Compiled version of printer profile not found |
86 | Printer driver module can not be loaded |
87 | System address record for system variables not found |
88 | Document is not in correct format for printing |
90 | Parameter From-page must not be greater than To-page |
Z-105
Z-120
Z-122
Z-123
Z-165
Z-170
Z-175
Z-177
Z-194
Z-197
Z-222
Z-223
Z-400
Z-401
Z-1200&0
0010 * 0020 * Example program format and print a Cnf or Int 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 FROM-PAGE (N3) 0130 1 TO-PAGE (N3) 0140 1 PRINTER-PROFILE (A32) 0150 1 FORMAT-PROFILE (A32) 0160 1 SYSTEM-VARIABLES (A1) 0170 1 ENCLOSURES (A1) 0180 1 RESET-BUFFER (A1) 0190 1 OPEN-FLAG (L) 0200 1 CLOSE-FLAG (L) 0210 1 MESSAGE-FLAG (L) 0220 1 MAIN-PRINTER-FLAG (L) 0230 * 0240 END-DEFINE 0250 * 0260 RESET RETURN-CODE 0270 * 0280 MOVE 'TID ' TO PRINTER-TID 0290 * 0300 IF PRINTER-TID EQ 'PC' 0310 DEFINE PRINTER(#OUT=5) 0320 ELSE 0330 DEFINE PRINTER(#OUT=5) OUTPUT PRINTER-TID 0340 END-IF 0350 * 0360 FORMAT(#OUT) PS=250 LS=129 0370 * 0380 MOVE 'CABINET' TO CABINET 0390 MOVE 'PASSWORD' TO PASSWORD 0400 MOVE 1234567890 TO ISN 0410 * 0420 MOVE 'X' TO SYSTEM-VARIABLES 0430 MOVE 'X' TO ENCLOSURES 0440 MOVE 'X' TO RESET-BUFFER 0450 MOVE TRUE TO MESSAGE-FLAG 0460 * 0470 CALLNAT 'Z-PRI11Y' 0480 RETURN-CODE 0490 CABINET 0500 PASSWORD 0510 DOCUMENT-NAME 0520 ISN 0530 PRINTER-TID 0540 FROM-PAGE 0550 TO-PAGE 0560 PRINTER-PROFILE 0570 FORMAT-PROFILE 0580 SYSTEM-VARIABLES 0590 ENCLOSURES 0600 RESET-BUFFER 0610 OPEN-FLAG 0620 CLOSE-FLAG 0630 MESSAGE-FLAG 0640 MAIN-PRINTER-FLAG 0650 * 0660 IF RETURN-CODE EQ 0 0670 WRITE 'Document was printed' RETURN-CODE 0680 ELSE 0690 WRITE 'Return code ' RETURN-CODE 0700 END-IF 0710 * 0720 END