You can use this macro to check whether an e-mail send order is completed. If the order has been carried out, the execution status is sent to the caller and removed from the ASTI queues.
Entry names or SVC number(s)
SVC 20 (decimal)
UNIT=940, FUNCTION=21, VERSION=1 | 2
Macro call format and operand description
YMLCML |
FL= *TU / *TPR ,VERSION= 1 / 2 ,ORDER= *ANY / *SINGLE ,ORDERID= <var: char:16> ,WAIT= *NO / *YES ,WAITTIM= *UNLIM / <integer: 1..65535> / <var: int:4> ,OPTFILE= *NONE / <var: char:54> |
FL=
Function area
*TU
An SVC interface is generated.
*TPR
A CALL interface is generated.
VERSION=
Selects the interface version.
1
Selects the old interface version.
2
Selects the new interface version, which offers the operands WAITTIM and OPTFILE and additional return codes.
ORDER=
Specifies the e-mail send orders for which the result is to be requested.
*ANY
The execution of a completed order sent by the macro caller is queried. If there are several completed orders, it is not specified which of these orders is to have its status queried.
*SINGLE
The result of the e-mail send order identified by the ORDERID parameter is queried.
ORDERID=
If ORDER=*SINGLE is specified, this parameter specifies the ID of the e-mail send order to be checked.
<IDENTIFIER>
Variable in which the order ID is stored or register containing the address of a variable in which the order ID is stored.
WAIT=
Specifies whether the caller wants to wait until processing of the e-mail send order by the mail sender backend is completed.
*NO
Do not wait.
*YES
Wait until the mail sender backend reports that processing of the e-mail send order is completed or that there was an error sending the e-mail.
WAITTIME=
With this operand the wait time can be limited in the case of WAIT=*YES. The operand is only available with VERSION=2. When the maximal wait time is reached, the call is terminated with an appropriate return code.
*UNLIM
Unlimited wait time. With this operand value the behaviour is as hitherto.
<INTEGER 1..65535>
Maximal wait time in seconds.
<IDENTIFIER>
Variable or register containing the wait time (in seconds).
OPTFILE=
With this operand a user option file can be specified. The operand is available only with VERSION=2. The user option file can influence the macro behaviour by settings regarding the user specific logging (see logItems option).
*NONE
No file defined.
<IDENTIFIER>
Variable containing the name of the user option file or register containing the address of the name of the user option file.
Return codes
SRC2 | SRC1 | MRC | MRC name | Meaning |
|
|
|
| E-mail concluded without an error. |
|
|
|
| Parameter error. |
|
|
|
| Internal error. |
|
|
|
| Order not found. |
|
|
|
| Order sent by external task. |
|
|
|
| ASTI subsystem not available. |
|
|
|
| No result requested. |
|
|
|
| Order not concluded. |
|
|
|
| Unexpected ASTI error. |
|
|
|
| Maximal wait time reached. |
|
|
|
| Error at access to user option file. |
|
|
|
| Resource saturation. |
|
|
|
| Service MAILCLNT not available. |
SRC1/2 = sub-return code 1/2 in hexadecimal notation
MRC = main return code in hexadecimal notation
Macro call parameters
The data structure for the macro call parameters of YMLCML is composed as follows:
VERSION=1:
Distance | Identifier | Value | Meaning |
| Parameter area. | ||
000 |
| Function header. | |
008 |
| Input parameters. | |
008 |
| ID of the e-mail send order in the case of | |
018 |
| Which e-mail send order’s result is to be queried? | |
| 1 | Any of the caller’s orders. | |
| 2 | The order with the ID | |
019 |
| Wait for the completion of the e-mail send order? | |
| 1 | Yes | |
| 2 | No | |
01A |
| Reserved section. | |
01C |
| Output parameters. | |
01C |
| Order ID of selected order in the case of YMLCOANY. | |
02C |
| Return code from backend | |
| 00 | Ok | |
| 01 | Parameter error | |
| 02 | Resource saturation | |
| 03 | SMTP error | |
| 04 | S/MIME error | |
| 0A | Internal error | |
030 |
| May contain error messages in text format (e.g. SMTP error messages of the SMTP server). | |
0D0 |
| If the YMLCML call returns the return code YMLCASTI, this field contains the ASTI return code. |
VERSION=2:
Distance | Identifier | Value | Meaning |
| Parameter area | ||
000 |
| Function header | |
008 |
| Input parameters | |
008 |
| ID of e-mail send order in case YMLCOSNG. | |
018 | YMLCWTTM | Maximal wait time | |
01C |
| Which e-mail send order's result is to be queried? | |
| 1 | Any of the caller's orders. | |
| 2 | The order with the ID YMLCOIDI. | |
01D |
| Wait for the completion of the e-mail send order? | |
| 1 | Yes | |
| 2 | No | |
01E |
| User option file | |
054 |
| Output parameters | |
054 |
| Order ID of selected order in the case of YMLCOANY. | |
064 |
| Return code from backend | |
| 00 | Ok | |
| 01 | Parameter error | |
| 02 | Resource saturation | |
| 03 | General SMTP error | |
| 04 | S/MIME error | |
| 05 | Error with SMTP MAIL command | |
| 06 | Error with SMTP RCPT command | |
| 07 | Error with SMTP DATA command | |
| 08 | Error at access to user option file | |
| 09 | Mail too large | |
| 0A | Internal error | |
068 |
| May contain error messages in text format (e.g. SMTP error messages of the SMTP server). | |
108 |
| If the YMLCML call returns the return code YMLCASTI, this field contains the ASTI return code. | |
10C |
| Message ID | |
113 |
| Reserved area |
Supplementary notes to the output parameters:
YMLCRETC
Some failure situations, where with VERSION=1 only a collective return code is delivered, are covered by specific return codes with VERSION=2 for finding out the real error reason more quickly. For instance the return code YMLCBMM is a strong hint that there is an error in the sender address. Accordingly the return code YMLCBMR indicates an error in at least one of the recipient addresses. A YMLCBMD can e.g. occur, when the SMTP server checks the violation of certain rules only after the DATA command, the reason for the rule violation can be related to the specified addresses. In any case the field YMLCRETM should give further (text) information related to the error cause.
YMLCRETM
If the SMTP server used supports RFC 2034, then this field contains a machine interpretable error indicator, which in general is more specific than the SMTP related return codes in the YMLCRETC field.
YMLCMID
This field contains a YML message key for a message describing the occured error. This is normally the same message as a corresponding REQUEST-MAIL-ORDER-RESULT command call would deliver.
Listing of the expansion of the data structure for the macro call parameters
Expansion:
XPAND=
PARAM
YMLCML MF=D 1 MFTST MF=D,PREFIX=Y,MACID=MLC,ALIGN=F, 1 DMACID=MLC,SUPPORT=(E,D,C,M,L),DNAME=MLCPARL 000000 2 YMLCPARL DSECT , 1 * rc 00000000 1 YMLCBOK EQU 0 OK 00000001 1 YMLCBPER EQU 1 Parameter error 00000002 1 YMLCBRSC EQU 2 Resource saturation 00000003 1 YMLCBSMT EQU 3 SMTP error 00000004 1 YMLCBSMI EQU 4 SMIME error 0000000A 1 YMLCBINT EQU 10 Internal error 1 * 1 * Parameter area 1 YMLCHDR FHDR MF=(C,YMLC),EQUATES=NO FHDR 1 * main return codes 00000000 1 YMLCSUCC EQU 0 No error detected 00000001 1 YMLCPARE EQU 1 Parameter error 00000002 1 YMLCINTE EQU 2 Internal error 00000003 1 YMLCONTF EQU 3 Order not found 00000004 1 YMLCFTSK EQU 4 Order issued by foreign task 00000005 1 YMLCANAV EQU 5 Subsystem ASTI not available 00000006 1 YMLCNORR EQU 6 No result requested 00000007 1 YMLCONCM EQU 7 Order not completed 00000008 1 YMLCASTI EQU 8 Unexpected ASTI error 1 * 1 * 000008 1 YMLCIND DS 0XL20 Input parameters 000008 1 YMLCOIDI DS CL16 Order Id 000018 1 YMLCORDS DS FL1 Order specification 1 * order 00000001 1 YMLCOANY EQU 1 ANY 00000002 1 YMLCOSNG EQU 2 SINGLE 1 * 000019 1 YMLCWAIT DS FL1 Wait 1 * wait 00000001 1 YMLCWYES EQU 1 YES 00000002 1 YMLCWNO EQU 2 NO 1 * 00001A 1 YMLCRSV1 DS CL2 Reserved 1 * 1 * 00001C 1 YMLCOUTD DS 0XL168 Output parameters 00001C 1 YMLCRETC DS F Return code 000020 1 YMLCRETM DS CL160 Return message 0000C0 1 YMLCARET DS F Return code from ASTI 1 * 000000C4 1 YMLC# EQU *-YMLCHDR