Domain:
UTILITIES
Required authorization:
STD-PROCESSING
TSOS
You can use the SHOW-MAIL-ORDER-STATUS command to query the status of the mail send orders sent.
For all current orders, SHOW-MAIL-ORDER-STATUS indicates whether they:
Are waiting to be executed
Are currently being executed or
Have already been executed
The SHOW-MAIL-ORDER-STATUS command supports structured output in S variables (see the manual “Commands, Volume 6, S Variables”).
SHOW-MAIL-ORDER-STATUS |
ORDER-ID = *ALL / list-poss(30): <x-text 1..16> ,SENDER-USERID = *OWN / *ANY / <name 1..8> ,INFORMATION = *SUMMARY / *ALL |
Operands
ORDER-ID = *ALL / list-poss(30): <x-text 1..16>
Specifies which orders are selected.
ORDER-ID = *ALL
All orders of the users specified by means of the SENDER-USERID operand are selected.
ORDER-ID = list-poss(30): <x-text 1..16>
Here you can specify up to 30 orders to be selected. Only users with TSOS authorization can specify orders that have a different user ID.
SENDER-USERID = *OWN / *ANY / <name 1..8>
Specifies the users whose orders are to be selected.
SENDER-USERID = *OWN
Only the orders of the command caller are selected.
SENDER-USERID = *ANY
For users without TSOS authorization, this has the same effect as specifying *OWN. For users with TSOS authorization, it means that the orders of all users are selected.
SENDER-USERID = <name 1..8>
User ID whose orders are to be selected. Only users with TSOS authorization can specify orders of another user ID.
INFORMATION = *SUMMARY / *ALL
Specifies which information on the orders is output.
INFORMATION = *SUMMARY
Only the summaries of the order categories are output.
INFORMATION = *ALL
All the available information on the selected orders is output.
Return codes
(SC2) | SC1 | Maincode | Meaning |
0 | CMD0001 | No error. | |
64 | CMD0216 | The user does not have the required authorization for the comand. | |
32 | CMD0220 | Internal error. | |
32 | CMD2009 | Error during creation of the output variable. | |
64 | YML0120 | The ASTI subsystem is not available. | |
32 | YML0176 | Unexpected ASTI error. | |
64 | YML0210 | Order not found. | |
128 | YML0214 | Resource utilization. | |
64 | YML0216 | Order executed by another application. | |
64 | YML0218 | Order not a mail send order. |
Output data
With the operand INFORMATION=*SUMMARY, the mail send orders are selected on the basis of the ORDER-ID and SENDER-USERID operands and grouped into categories. The total is output. Distinctions are drawn between five categories:
WAITING
The order is waiting to be executed by the backend task.
DEFERRED
During execution by the backend task, a time-limited error occurred (when the mail server was shut down, for example). After a certain time, another attempt is made to execute the order.
ACTIVE
The order is currently being executed by the backend task. The application does not support parallel processing. The number of orders in this category can therefore only be 0 or 1, except when an error occurs.
SENT
The order was successfully executed.
FAILED
An error occurred during the processing of the order.
The data can be stored in an S variable containing the names of the categories as components.
If INFORMATION=*ALL is specified, several lines are output for each order selected.
The following table gives the labels of the SYSOUT lines and the corresponding component names of the S variables. If a certain value does not exist, the associated line or variable component is suppressed.
SYSOUT | S variable | Meaning |
ORDER-ID | ORDER-ID | Order ID |
STATE | STA | Order status (WAITING, DEFERRED, ACTIVE, SENT, FAILED) |
SEND TIME | SEND-TIME | Send time of the e-mail |
SENDER | SENDER | User ID of the mail sender |
RETURN CODE | RETURN-CODE | Return code of the backend task when STATUS = SENT or FAILED is specified |
RETURN MESSAGE | RETURN-MSG | End-of-order message of the mail server or plain-text error message when STATUS = SENT or FAILED is sent |
FROM | FROM | Value of the SEND-MAIL operand FROM |
TO | TO | Value of the SEND-MAIL operand TO |
CC | CC | Value of the SEND-MAIL operand CC |
BCC | BCC | Value of the SEND-MAIL operand BCC |
Examples
|