Z-MLGETA

This document covers the following topics:


Description

Return the mail status message of a specific user and the time range in which it is to appear.

The timezone is always GMT. Other timezones are not considered.

This subprogram is the same as Z-MLSGET with the exception that additional parameters have been introduced.

This subprogram can be invoked prior to Z-MAILA or Z-MAILAX to find out whether the user has set a mail status message. However, it can also be used independently.

You cannot specify more than one ID in the Cabinet parameter. If you want to get the mail status message for several users, you must invoke this subprogram for each user.

For another cabinet than your own, the mail status message is only returned when it has been activated (i.e. when the user has marked the "Set Mail Status Message" field).

For your own cabinet, the mail status message is also returned when it has not been activated.

Parameters

Parameter Format In Out Remarks
Return-code N2   X  
Cabinet A8 R   The cabinet in which the mail status message is to be returned.
Active A1   X If marked, the mail status message has been activated.
Start-date A8   X Format yyymmdd.
Start-time A4   X Format hhmm.
End-date A8   X Format yyymmdd.
End-time A4   X Format hhmm.
Mail-status-message A37/1:10   X The text of the mail status message.

Return Codes

00 Success
02 Invalid cabinet name or - in batch mode only - locked cabinet

Subprograms

None

Example

0010 *********************************************************************
0020 * Return the status message of a user
0030 *********************************************************************
0040 *
0050 DEFINE DATA
0060 *
0070 LOCAL
0080 *
0090 1 RETURN-CODE           (N2)
0100 1 CABINET               (A8)
0110 1 ACTIVE                (A1)
0120 1 START-DATE            (A8)
0130 1 START-TIME            (A4)
0140 1 END-DATE              (A8)
0150 1 END-TIME              (A4)
0160 1 MAIL-STATUS-MESSAGE   (A37/1:10)
0170 *
0180 END-DEFINE
0190 *
0200 * Input API parameters
0210 *
0220 *
0230   INPUT (AD=I'_')
0240     // 25X '********** Z-MLGETA **********' /
0250    '  Cabinet' CABINET /
0260 *
0270   CALLNAT 'Z-MLGETA' RETURN-CODE
0280     CABINET
0290     ACTIVE
0300     START-DATE
0310     START-TIME
0320     END-DATE
0330     END-TIME
0340     MAIL-STATUS-MESSAGE(*)
0350 *
0360   IF RETURN-CODE EQ 0
0370     WRITE
0380       '=' CABINET /
0390       '=' ACTIVE //
0400       'Mail Status Message :' //
0410       ' 1' MAIL-STATUS-MESSAGE (1) /
0420       ' 2' MAIL-STATUS-MESSAGE (2) /
0430       ' 3' MAIL-STATUS-MESSAGE (3) /
0440       ' 4' MAIL-STATUS-MESSAGE (4) /
0450       ' 5' MAIL-STATUS-MESSAGE (5) /
0460       ' 6' MAIL-STATUS-MESSAGE (6) /
0470       ' 7' MAIL-STATUS-MESSAGE (7) /
0480       ' 8' MAIL-STATUS-MESSAGE (8) /
0490       ' 9' MAIL-STATUS-MESSAGE (9) /
0500       '10' MAIL-STATUS-MESSAGE (10) //
0510     WRITE     '=' START-DATE
0520     WRITE     '=' START-TIME
0530     WRITE     '=' END-DATE
0540     WRITE     '=' END-TIME
0550   ELSE
0560     WRITE '=' RETURN-CODE
0570   END-IF
0580 *
0590 END