Domain:
UTILITIES
Required authorization:
STD-PROCESSING
TSOS
You can use the REQUEST-MAIL-ORDER-RESULT command to query the execution status of the mail send order. The status is returned by the backend task after the order is processed. The order data is deleted from the internal ASTI tables. The associated SYS file under the user ID of the mail sender is deleted.
The REQUEST-MAIL-ORDER-RESULT command does not provide any information on orders that have not yet been processed. In this case, you can use the SHOW-MAIL-ORDER-STATUS command to get information on the order (see "SHOW-MAIL-ORDER-STATUS - Query information on mail orders"). The REQUEST-MAIL-ORDER-RESULT command supports structured output in S variables (see the manual “Commands, Volume 6, S Variables”).
REQUEST-MAIL-ORDER-RESULT |
ORDER-ID = *ANY / <x-text 1..16> ,WAIT-FOR-RESULT = *NO / *YES ,USER-OPTION-FILE = *STD / <filename 1..54 without-gen> |
Operands
ORDER-ID = *ANY / <x-text 1..16>
Specifies the order whose execution status is queried.
ORDER-ID = *ANY
The execution status of a completed order sent by the command caller is queried. If there are several completed orders, it is not specified which of these orders’ status is queried.
ORDER-ID = <x-text 1..16>
ASTI order ID of the order whose execution status is queried.
WAIT-FOR-RESULT = *NO / *YES
Specifies whether the command waits until the processing of the order is completed.
WAIT-FOR-RESULT = *NO
The command does not wait for the end of an order that is not yet completed. You can query the execution status of the order subsequently by calling REQUEST-MAIL-ORDER-RESULT again.
WAIT-FOR-RESULT = *YES
The command waits until the order is completed.
If ORDER-ID=*ANY is specified, waiting is implemented internally by means of regular queries at intervals of 60 seconds, so that waiting is completed an average of 30 seconds after the end of the order.
USER-OPTION-FILE = *STD / <filename 1..54 without-gen>
Specifies a user option file containing default values for different operands. You will find a detailed description of the user option file in the section “Configuration file for the mail sender frontend (user option file)”.
USER-OPTION-FILE = *STD
The default user options are obtained from the file specified in the SYSSSI option file with the defaultOptionFileName option (see “interNet Services BS2000 (Related publications), Administrator Guide (Related publications)”). The default setting for this option is SYSDAT.MAIL.nnn.USER.OPT.
USER-OPTION-FILE = <filename 1..54 without-gen>
The file specified here is used as the user option file.
Return codes
(SC2) | SC1 | Maincode | Meaning |
0 | CMD0001 | No error. | |
32 | CMD0220 | Internal error. | |
32 | CMD2009 | Error during creation of the S variable. | |
64 | YML0120 | ASTI subsystem not available. | |
32 | YML0176 | Unexpected ASTI error. | |
64 | YML0210 | Order was not found. | |
128 | YML0214 | Resources are exhausted. | |
64 | YML0215 | A result was not requested when the order was issued. | |
64 | YML0216 | The order was executed by an external task. | |
128 | YML0222 | Order not completed. |
Examples
|
|
Output data
When an order is terminated, the command outputs three lines containing information on the execution status.
The first line (ORDER-ID) specifies the ID of the order for which the data is specified. This is relevant, above all, if ORDER-ID=*ANY was specified.
The second line (RETURN CODE) specifies whether an error has occurred and, if so, which one. The possible values are:
OK
The e-mail was sent successfully.
Error during SMTP protocol
The mail server reported an error to the backend task.
Error during S/MIME operation
An error occurred during S/MIME processing (e.g. certificate problems).
Internal error
In the case of all other errors.
The third line (RETURN MESSAGE) contains the following information:
In the event of an error:
Additional textual information on the error.In the event of a successfully terminated order:
Concluding message of the mail server. This message generally contains the (partial) message ID, indicating that the e-mail was rejected by the server. If an error occurs subsequently in the course of mail transfer, the administrator can use this ID to trace the transfer of the e-mail across the chain of mail servers.
The data can also be transferred to an S variable structured in accordance with the output of the command.