This document covers the following topics:
Forward mail.
The mail item that you want to forward must be contained in the folder Inbasket, regardless whether it has already been read or not. You can forward a document or a memo.
When you forward a mail item which is currently stored in the Inbasket file New, the corresponding address list is updated so that the reception status of the mail item indicates that it has been read. Additionally, the mail item is moved from the file New to the file Opened. In this case, END TRANSACTION is automatically issued.
The parameters Inbasket-ISN, Forward-table and one of the Cover-note parameters are required. The parameter Inbasket-ISN must contain the ISN of the mail item that you are forwarding. To obtain the ISN, you can call, for example, Z-DIS13A prior to calling Z-FORWD.
In the Forward-table, you must specify all addressees to which you want to forward the mail item; you can specify up to 12 addressees.
Different address types can be created using the same name (for example, a user ID may coincide with a distribution list name). If the address type is not specified and addressees with the same name, but different address types are found, the system first tries to send to address type 33 (user ID) and then to 5 (cabinet). It does not check any other address types.
If you specify a combination of last name and first name as addressee, Z-FORWD is able to recognize an expression like "Long,Sonya" as well as "Long,S", "Long,So" or simply "Long" - as long as these expressions are unique.
The parameter Success indicates whether an addressee was found or not. The parameter Forward-option determines how Z-FORWD is to proceed when an addressee cannot be found. When you specify the value 1 for this parameter, the mail item is forwarded to all other addressees that can be found. When you specify any other value or if at least one valid addressee cannot be found, the return code 21 is issued and further addressees are not checked.
The Cover-note* parameters offer several possibilities to create a cover note for the forwarded mail item; you must specify only one of these parameters, not all.
If the parameter Cover-note-name is filled, Z-FORWD searches for a document with this name and copies the main text of this document to the cover note of the mail item.
If the parameter Cover-note-ISN is filled, Z-FORWD searches for an object with this ISN and copies the main text of this object to the cover note of the mail item. It is not required that the object is a document.
If the parameter Cover-note-text is marked, Z-FORWD creates a cover note from the contents of the Natural edit area. The edit area contents are not changed. The example below demontrates how to use this method to specify the text.
Note:
"*/" in the first two positions of a line in the Natural edit area
generates a new page in the text.
When the mail item was forwarded, the parameter Outbasket-ISN contains the ISN of the new Outbasket entry.
When a value other than 0 is returned in the parameter Return-code, BACKOUT TRANSACTION is automatically issued.
Parameter | Format | In | Out | Remarks |
---|---|---|---|---|
Return-code | N2 | O | X | Input -1: no ET. |
Cabinet | A8 | R | The cabinet from which you forward the mail item. | |
Password | A8 | R | The password of the above cabinet. | |
Inbasket-ISN | P10 | R | The ISN of the mail item that is to be forwarded. | |
Outbasket-ISN | P10 | X | The ISN of the new Outbasket entry. | |
Cover-note-name | A32 | O* | If specified, the cover note text is copied from a document with this name. | |
Cover-note-ISN | P10 | O* | If specified, the cover note text is copied from an object with this ISN. | |
Cover-note-text | A1 | O* | If marked, the cover note text is copied from the Natural edit area. | |
Forward-option | I1 | O | 0=forward only when all addressees can be found; 1=forward to all found addressees (even when one of the addressees cannot be found). Default: 0 | |
Forward-table (12) | ||||
Addressee | A20 | R | The name or user ID of the addressee. | |
Address-type | N2 | O | Must be one of the following: 1=Address (nickname), 4=Bulletin, 5=Cabinet, 10=Distribution, 33=User ID, 70=Last name or 74=External. | |
Mail-type | A1 | O | Must be one of the following: O=original, C=copy, B=blindcopy or P=private. Default: O. | |
Success | I1 | X | 00=Addressee was found. 01=Addressee was not found. 02=Addressee is not unique. 03=Invalid Address-type. |
00 | Success |
02 | Invalid cabinet name |
03 | Password incorrect |
04 | Inbasket ISN was not found |
08 | Supply name, ISN, or text for cover note, not all |
09 | Inbasket ISN does not point to correct object |
18 | API context buffer not available |
21 | Addressee not found |
24 | Security violation |
53 | Requested document does not exist |
57 | Requested object does not contain a main text |
60 | Edit area is empty |
90 | Transport service object could not be created |
99 | Internal error |
Z-MPPDB
Z-MPPLF
Z-RAREC
Z-RASSTX
Z-RCONFM
Z-RINITM
Z-RREC
Z-110
Z-120
Z-122
Z-123
Z-124
Z-145
Z-147
Z-161
Z-165
Z-168
Z-175
Z-177
Z-180
Z-185
Z-191
Z-191A
Z-194
Z-194A
Z-197
Z-197A
Z-200B
Z-201
Z-201B
Z-202
Z-207
Z-208
Z-211
Z-212
Z-213
Z-215
Z-216
Z-221
Z-222
Z-223
Z-224
Z-225
Z-226
Z-241
Z-373
Z-400
Z-401
Z-402
Z-403
Z-404
Z-406
Z-407
Z-719
Z-747
Z-1200&0
0010 * 0020 * 0030 * 0040 * This example assumes that the ISN of the Inbasket item, 0050 * the text of the cover note and the selected addressees 0060 * have been checked by a previous main routine 0070 * 0080 DEFINE DATA 0090 * 0100 PARAMETER 0110 * 0120 1 RETURN-CODE (N2) 0130 1 CABINET (A8) 0140 1 PASSWORD (A8) 0150 1 INBASKET-ISN (P10) 0160 1 FORWARD-TABLE (1:12) 0170 2 ADDRESSEE (A20) 0180 2 ADDRESS-TYPE (N2) 0190 2 MAIL-TYPE (A1) 0200 2 SUCCESS (I1) 0210 1 TEXT-LINES (A70/1:20) 0220 * 0230 LOCAL 0240 * 0250 1 OUTBASKET-ISN (P10) 0260 1 FORWARD-OPTION (I1) 0270 1 COVER-NOTE-NAME (A32) 0280 1 COVER-NOTE-ISN (P10) 0290 1 COVER-NOTE-TEXT (A1) 0300 * 0310 1 INX (P3) 0320 * 0330 END-DEFINE 0340 * 0350 * Prepare destination 'SOURCE' and put text lines 0360 * into the cleared Natural edit area 0370 * 0380 DEFINE PRINTER (#OUT=1) OUTPUT 'SOURCE' 0390 FORMAT (#OUT) LS=80 PS=60 0400 SET CONTROL 'Z' 0410 * 0420 FOR INX EQ 1 TO 20 0430 WRITE (#OUT) NOTITLE TEXT-LINES (INX) 0440 END-FOR 0450 * 0460 * Now forward mail item to all found addressees, incl. ET 0470 * 0480 RESET RETURN-CODE 0490 MOVE 1 TO FORWARD-OPTION 0500 MOVE 'X' TO COVER-NOTE-TEXT 0510 * 0520 CALLNAT 'Z-FORWD' 0530 RETURN-CODE 0540 CABINET 0550 PASSWORD 0560 INBASKET-ISN 0570 OUTBASKET-ISN 0580 COVER-NOTE-NAME 0590 COVER-NOTE-ISN 0600 COVER-NOTE-TEXT 0610 FORWARD-OPTION 0620 FORWARD-TABLE (*) 0630 * 0640 END