This document covers the following topics:
Reply to mail.
The mail item to which you want to reply must be contained in the folder Inbasket, regardless whether it has already been read or not. You can reply to a document, memo or invitation. You can send your reply to the sender, the forwarder or both.
When you reply to a document or memo item which is currently stored in the Inbasket file New, the corresponding address list is updated so that the reception status of the document or memo indicates that it has been read. Additionally, the document or memo is moved from the file New to the file Opened. In this case, END TRANSACTION is automatically issued.
The parameters Inbasket-ISN, Reply-to and one of the Reply* parameters (name, ISN or text) are required. The parameter Inbasket-ISN must contain the ISN of the mail item you are replying to. To obtain the ISN, you can call, for example, Z-DIS13A prior to calling Z-REPLY. The parameter Reply-to specifies to whom you are sending the reply. The Reply* parameters (name, ISN or text) offer several possibilities to create the text of the reply - you must specify only one of these parameters, not all.
If the parameter Reply-name is filled, Z-REPLY searches for a document with this name and copies the main text of this document to the reply.
If the parameter Reply-ISN is filled, Z-REPLY searches for an object with this ISN and copies the main text of this object to the reply. It is not required that the object is a document.
If the parameter Reply-text is marked, Z-REPLY creates a reply 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 reply was sent, 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 the reply is to be sent. | |
Password | A8 | R | The password of the above cabinet. | |
Inbasket-ISN | P10 | R | The ISN of the mail item on which the reply is to be sent. | |
Outbasket-ISN | P10 | X | The ISN of the new Outbasket entry. | |
Reply-to | A1 | R | Must be one of the following: 1 = reply is sent to sender; 2 = reply is sent to forwarder; 3 = reply is sent to both sender and forwarder. | |
Reply-name | A32 | R* | If specified, the reply text is copied from a document with this name. | |
Reply-ISN | P10 | R* | If specified, the reply text is copied from an object with this ISN. | |
Reply-text | A1 | R* | If marked, the reply text is copied from the Natural edit area. |
00 | Success |
02 | Invalid cabinet name |
03 | Password incorrect |
04 | Inbasket ISN was not found |
08 | Supply name, ISN, or text for reply, not all |
09 | Inbasket ISN does not point to correct object |
18 | API context buffer not available |
21 | Addressee not found |
24 | Security violation |
27 | Cover note (i.e. reply text) is required |
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-RAREC
Z-RASSTX
Z-RCONFM
Z-RINITM
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-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-241
Z-373
Z-400
Z-401
Z-402
Z-403
Z-404
Z-406
Z-407
Z-747
Z-1200&0
0010 * 0020 * 0030 * 0040 * This example assumes that the ISN of the Inbasket item 0050 * and the text of the reply have been checked by a previous 0060 * 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 TEXT-LINES (A70/1:20) 0170 * 0180 LOCAL 0190 * 0200 1 OUTBASKET-ISN (P10) 0210 1 REPLY-TO (A1) 0220 1 REPLY-NAME (A32) 0230 1 REPLY-ISN (P10) 0240 1 REPLY-TEXT (A1) 0250 * 0260 1 INX (P3) 0270 * 0280 END-DEFINE 0290 * 0300 * Prepare destination 'SOURCE' and write 0310 * the text lines into the Natural edit area 0320 * 0330 DEFINE PRINTER (#OUT=1) OUTPUT 'SOURCE' 0340 FORMAT (#OUT) LS=80 PS=60 0350 SET CONTROL 'Z' 0360 * 0370 FOR INX EQ 1 TO 20 0380 WRITE (#OUT) NOTITLE TEXT-LINES (INX) 0390 END-FOR 0400 * 0410 * Now send reply to sender, incl. ET 0420 * 0430 RESET RETURN-CODE 0440 MOVE '1' TO REPLY-TO 0450 MOVE 'X' TO REPLY-TEXT 0460 * 0470 CALLNAT 'Z-REPLY' 0480 RETURN-CODE 0490 CABINET 0500 PASSWORD 0510 INBASKET-ISN 0520 OUTBASKET-ISN 0530 REPLY-TO 0540 REPLY-NAME 0550 REPLY-ISN 0560 REPLY-TEXT 0570 * 0580 END