Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

SHOW-MAIL-ORDER-STATUS - Query information on e-mail send orders

&pagelevel(4)&pagelevel

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


0CMD0001No error.

64CMD0216The user does not have the required authorization for the comand.

32CMD0220Internal error.

32CMD2009Error during creation of the output variable.

64YML0120The ASTI subsystem is not available.

32YML0176Unexpected ASTI error.

64YML0210Order not found.

128YML0214Resource utilization.

64YML0216Order executed by another application.

64YML0218Order 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


/EXECUTE-CMD CMD=(SHOW-MAIL-ORDER-STATUS INFORMATION=*SUMMARY),-
/
             STRUCTURE-OUTPUT=OUT
%  # ORDERS
%    WAITING:     1
%    DEFERRED:    0
%    ACTIVE:      0
%    SENT:        1
%    FAILED:      0
%    TOTAL:       2

/SHOW-VARIABLE OUT
OUT(*LIST).WAITING = 1
OUT(*LIST).DEFERRED = 0
OUT(*LIST).ACTIVE = 0
OUT(*LIST).SENT = 1
OUT(*LIST).FAILED = 0


/EXECUTE-CMD CMD=(SHOW-MAIL-ORDER-STATUS ORDER=*ALL,INFORMATION=*ALL),-
/              STRUCTURE-OUTPUT=OUT
%  ORDER_ID:            01E7E48600000025
%  STATUS:              Waiting
%  SUBMISSION TIME:     2010-02-10 17:23:18
%  SUBMITTER:           CLAUDIO
%  FROM:                Claudio.Monteverdi@mantova.example
%  TO:                  Heinrich.Schuetz@dresden.example
%  CC:                  John.Bull@london.example
%  BCC:                 William.Byrd@london.example
%  ---
%  ORDER_ID:            01E7E48600000013
%  STATUS:              Sent
%  SUBMISSION TIME:     2010-02-10 11:05:54
%  SUBMITTER:           HEINRICH
%  RETURN CODE:         Ok
%  RETURN MESSAGE:      250 Ok: queued as BDB6F6EA2F
%  FROM:                Heinrich.Schuetz@dresden.example
%  TO:                  Claudio.Monteverdi@mantova.example


/SHOW-VARIABLE OUT
OUT(*LIST).ORDER-ID = 01E7E48600000025
OUT(*LIST).STA = Waiting
OUT(*LIST).SEND-TIME = 2010-02-10 17:23:18
OUT(*LIST).SENDER = CLAUDIO
OUT(*LIST).FROM = Claudio.Monteverdi@mantova.example
OUT(*LIST).TO = Heinrich.Schuetz@dresden.example
OUT(*LIST).CC = John.Bull@london.example
OUT(*LIST).BCC = William.Byrd@london.example
OUT(*LIST).ORDER-ID = 01E7E48600000013
OUT(*LIST).STA = Sent
OUT(*LIST).SEND-TIME = 2010-02-10 11:05:54
OUT(*LIST).SENDER = HEINRICH
OUT(*LIST).RETURN-CODE = Ok
OUT(*LIST).RETURN-MSG = 250 Ok: queued as BDB6F6EA2F
OUT(*LIST).FROM = Heinrich.Schuetz@dresden.example
OUT(*LIST).TO = Claudio.Monteverdi@mantova.example