Adding an External Printer Node

This document covers the following topics:


Add External Mail Node Screen

To add a printer as an external mail node, enter a name for the node in the "Mail Node/Type" field at the bottom of the "Administration - External Mail Nodes" screen (this is the name which is to be entered as the addressee when sending mail), and select the Add Mail Node function.

As a result, the "Add Mail Node" screen is displayed where you must enter the necessary information for adding a new node. See Add a Mail Node. Specify the address level and node type (G - Printer) and press ENTER to obtain the "Select Service Type" window. This window is used to specify whether the new node will use the spool file or transport service method. Mark the method you want and press ENTER.

If you select the transport service method, the "Transport Service Destination Node" window is displayed. Enter the name of the destination node and press ENTER to display the "Printer Node node-name" window.

If you select the spool file method, this window is immediately displayed.

  17:17               * * *  C O N - N E C T  3  * * *                5.Mar.2001
  Cabinet LS             Administration - Add Mail Node                   A06740

                                       +---------------------------------------+
          Node Name  RICHMOND          !   Transport Service Destination Node  !
                    +----------------------------------------- ----------------+
        Description !         Printer Node RICHMOND          !                 !
                    !  ___________________________________   !                 !
      Address Level !  ___________________________________   ! D_____          !
                    !  ___________________________________   !                 !
          Node Type !  ___________________________________   !                 !
                    !  ___________________________________   !                 !
  A Con-nect      B !  ___________________________________   !                 !
  T Teletex         !   Program ________ for Header Lines    !                 !
                    !           ________ for Printing        !                 !
                    !   Printer ________ TID or LU           !                 !
                    !   Mark to _ allow modification         !                 !
                    +-----------------------------------------                 !
                                       +---------------------------------------+

 Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
                   Quit        Save
 Enter an addressee or use PF3 to quit the window

The following parameters can be assigned in the "Printer Node node-name" window for printers using either service type:

1: 6 lines with 40 positions each, e.g. for an address or parameter

2: Program for the preparation of header lines (parameter 1)

3: Program which controls the entire output printout

4: TID or LU of printer on which output is to be printed

5: Allow modifications for parameters 1 and 2.

The six lines of parameter 1 are included in the first 15 lines (default) sent to the printer as follows:

Line Content
1 Con-nect Sender
2 Con-nect Date
3 Con-nect Time
4  
5 Parameter 1.1
6 Parameter 1.2
7 Parameter 1.3
8 Parameter 1.4
9 Parameter 1.5
10 Parameter 1.6
11  
12  
13 Con-nect Subject
14  
15  

If parameter 1 is empty or if modifications are permitted, the "Print Mail" window is displayed when the item is sent, and parameters 1 and 2 can be modified by the user, as shown in the next example.

  11:34 AM             * * *  C O N - N E C T  3  * * *                14.Feb.94
  Cabinet LS                        Send                                  C09000
                                    Memo Memo   14.Feb.94 11:34               
  Addressee(s) ____________________________________________________________     
               Selected 1           Sent to 0                                   
  Eshberry, John    +---------------------------------------+                   
                    !             Print Mail                !                   
                    !  Mr.________________________________  !                   
                    !  John Eshberry______________________  !                   
  Subject Memo    2 !  ___________________________________  !_________          
 ------------------ !  Research Center____________________  !-------------------
   Hello John,      !  ___________________________________  !                   
                    !  ___________________________________  !                   
   Please review th !    Program ________ for Header Lines  !                   
                    !            ________ for Printing      !                   
   Regards,         !    Printer 291_____ TID or LU         !                   
                    !     Cancel _                          !                   
   Sonya            !                                       !                   
 ------------------ +---------------------------------------+-------------------
 or Mark to use Editor _                                                        
  1 Addressee(s) selected - use CONFIRM to send                                 
    Command /                                                              /    
 Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
       Help  Menu  Quit        Confm Mod   Dflt  Addr  Frmat Flip  Last  Home   

If parameter 2 or 3 is assigned an API name and if this module is present, the following parameters are called:

Parameter Format User-Supplied Returned Remarks
Lines N2 X X Number of print lines Default: 15
Texts A132/15 X X Output lines
User A8 X   Sender ID
ISN P8 X    

Parameters are passed to the API, and returned from the API.

Note:
No printing is performed by Con-nect for the User parameter.

Example Programs

The following program, X-GS-D1, is called to prepare (format) the header lines before program X-GS-D2 is called to send the object to the printer.

0010 DEFINE DATA PARAMETER 
0020 1 P-LINE-COUNT     (N2) 
0030 1 P-TEXTS          (A132/15) 
0040 * (1)        : Sender-Name 
0050 * (2)        : Sender-Date
0060 * (3)        : Sender-Time 
0070 * (4)        : Empty 
0080 * (5:10)     : Lines from printer address form 
0090 * (11:12)    : Empty 
0100 * (13)       : Subject 
0110 * (14:15)    : Empty 
0120 * 
0130 1 P-SENDER-ID      (A8) 
0140 1 P-ISN            (P10) 
0150 * 
0160 LOCAL 
0170 1 #COUNTER         (I1) 
0180 END-DEFINE 
0190 * 
0200 COMPRESS 'Subject :' P-TEXTS(13) INTO P-TEXTS(14) 
0210 FOR #COUNTER = 12 TO 4 STEP -1 
0220   MOVE P-TEXTS(#COUNTER) TO P-TEXTS(#COUNTER +1) 0230 END-FOR 
0240 COMPRESS 'Sent By :' P-TEXTS(1) P-SENDER-ID INTO P-TEXTS(1) 
0250 COMPRESS 'Date    :' P-TEXTS(2) INTO P-TEXTS(2) 
0260 COMPRESS 'Time    :' P-TEXTS(3) INTO P-TEXTS(3) 
0270 * 
0280 END

Program X-GS-D2 is called directly after X-GS-D1 is terminated to send the object to the printer. This example program is applicable for printers using the spool file method.

0040 DEFINE DATA PARAMETER 
0050 1 P-LINE-COUNT         (N2) 
0060 1 P-TEXTS              (A132/15) 
0070 1 P-SENDER-ID          (A8) 
0080 1 P-ISN                (P10) 
0090 LOCAL 
0100 1 #COUNTER             (I1) 
0110 1 P-STATE              (N2) INIT <02> 
0120 * 
0130 1 SPOOL-FILE VIEW OF CNT-SPOOL 
0140   2 TEXT-KEY 
0150   2 REDEFINE TEXT-KEY 
0160     3 TEXTKEY          (B10) 
0170     3 TK-TYP           (B1) /* 1..100 is text, 255 is Addr.-List 
0180     3 TK-FORMAT        (B1) 
0190     3 TK-MODE          (B1) 
0200     3 TK-PAGE          (B1) 
0210   2 DIR-KEY 
0220   2 CREATED-ID 
0230   2 CREATED-NODE 
0240   2 CREATED-DATE 
0250   2 CREATED-TIME 
0260   2 ORIG-STAMP 
0270   2 STATUS-CODE 
0280   2 SENDER-NAME 
0290   2 SENDER-ID 
0300   2 TEXT-LINES         (20) 
0310   2 REDEFINE TEXT-LINES 
0320     3 TL-GROUP         (20) 
0330       4 TL-CR          (N1) 
0340       4 TL-TEXT        (A250) 
0350   2 C*TEXT-LINES 
0360 1 #TEXT-KEY            (A17) 
0370 1 REDEFINE #TEXT-KEY 
0380   2 #TK1               (B10) 
0390   2 #TK2               (B7) 
0400 * 
0410 1 #I1                  (I1)
0420 1 #TYP                 (B1) 
0430 1 #PAGE                (B1) 
0440 1 #MODE                (B1) 
0450 * 
0460 END-DEFINE
0470 * 
0480 FORMAT(2) LS=133 PS=60 
0490 * 
0500 * Write out the lines from the program X-GS-D1 
0510 * 
0520 FOR #COUNTER EQ 1 TO P-LINE-COUNT 
0530   WRITE(2) NOTITLE NOHDR P-TEXTS(#COUNTER) (AL=132) 
0540 END-FOR 
0550 * 
0560 READ(1) SPOOL-FILE BY ISN P-ISN P-ISN 
0570   MOVE ORIG-STAMP TO #TK1 
0580   RESET #TK2 
0590   READ SPOOL-FILE BY TEXT-KEY #TEXT-KEY 
0600     IF TEXTKEY NE #TK1 /* no more text records 
0610       OR TK-TYP GT 100 /* or no text type 
0620       ESCAPE BOTTOM 
0630     END-IF
0640     IF TK-FORMAT GT 1 
0650       ESCAPE BOTTOM /* not a text format (may be binary)
0660     END-IF 
0670 * 
0680 * If a change in the document-type, page-number-mode or page-number 
0690 * is detected and it is not the first one, a new page is written 
0700     IF (TK-TYP NE #TYP OR 
0710         TK-MODE NE #MODE OR 
0720         TK-PAGE NE #PAGE) AND 
0730         C*TEXT-LINES GT 0 
0740       IF #TYP NE 0 OR 
0750          #MODE NE 0 OR 
0760          #PAGE NE 0 
0770         NEWPAGE (2) 
0780       END-IF 
0790       MOVE TK-TYP TO #TYP 
0800       MOVE TK-PAGE TO #PAGE 
0810       MOVE TK-MODE TO #MODE 
0820     END-IF 
0830 * 
0840     IF C*TEXT-LINES GT 0 
0850       FOR #COUNTER = 1 TO C*TEXT-LINES 
0860 * Handle carriage control information 
0870         IF TEXT-LINES(#COUNTER) EQ MASK(N) 
0880           IF TL-CR(#COUNTER) GT 1 
0890             FOR #I1 = 2 TO TL-CR(#COUNTER) 
0900               WRITE(2) NOTITLE NOHDR ' ' 
0910             END-FOR 
0920           END-IF 
0930         END-IF 
0940         WRITE(2) NOTITLE NOHDR TL-TEXT(#COUNTER) (AL=132) 
0950       END-FOR 
0960     END-IF 
0970   END-READ 
0980 END-READ
0990 CALLNAT 'X-0POST' P-ISN P-STATE 
1000 END

When only a header is required, a program, such as X-GS-U (an excerpt of which is shown below), can be called to pass the object to the printer.

0010 DEFINE DATA PARAMETER 
0020 1 LINES             (N2)
0030 1 TEXTS             (A132/15) 
0040 1 USER              (A8) 
0050 1 ISN               (P8) 
0060 LOCAL 
0070 1 #COUNTER          (N2) 
0080 END-DEFINE 
0090 * 
0100 COMPRESS 'Subject :' TEXTS(13) INTO TEXTS(14) 
0110 FOR #COUNTER = 12 TO 4 STEP -1 
0120   MOVE TEXTS(#COUNTER) TO TEXTS(#COUNTER +1) 
0130 END-FOR 
0140 COMPRESS 'From :' TEXTS(1) USER INTO TEXTS(1) 
0150 COMPRESS 'Date :' TEXTS(2) INTO TEXTS(2) 
0160 COMPRESS 'Time :' TEXTS(3) INTO TEXTS(3) 
0170 * 
0180 END