Z-MLGETC

This document covers the following topics:


Description

Return the mail status message of a specific user, the time range in which it is to appear, whether date and time are to be hidden, and Cc information.

If Cc is specified in the mail status message, it informs who is to receive a copy of each mail item that is sent to this user.

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

This subprogram is similar to Z-MLGETB with the exception that it also returns the parameter Hide-date-time.

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.
Cc-flag A1   X If marked, Cc has been set.
Cc A20   X  
Cc-address-type N2   X One of the following: 1=address (nickname), 4=bulletin board, 5=cabinet, 33=user ID.
Cc-address-source A1   X Only if Cc-address-type is 1 (address): S=address is from cabinet SYSCNT. Blank=address is from Cabinet-name.
Cc-last-first-name A20   X Only if Cc-address-type is 1 (external address) or 33 (user ID). Blank if Cc-address-type is 1 and this is not an external address (e.g. nickname for user ID).
Cc-node-name A8   X Only if Cc-address-type is 1 (external address). Node name if this is a nickname for an external node. Blank if this is not a Cc for an external node.
Cc-status A1   X Blank=Cc is valid. X=Cc of given Cc-address-type was not found in Con-nect.
Hide-date-time A1   X If marked, the time range in which the mail status message is to appear is not shown in the mail status window.

Return Codes

00 Success
02 Invalid cabinet name

Subprograms

Z-723

Example

***********************************************************************
* Return the mail status message of a user
***********************************************************************
*
DEFINE DATA
*
LOCAL
*
1 RETURN-CODE           (N2)
1 CABINET               (A8)
1 ACTIVE                (A1)
1 START-DATE            (A8)
1 START-TIME            (A4)
1 END-DATE              (A8)
1 END-TIME              (A4)
1 MAIL-STATUS-MESSAGE   (A37/1:10)
1 CC-FLAG               (A1)
1 CC                    (A20)
1 CC-ADDRESS-TYPE       (N2)
1 CC-ADDRESS-SOURCE     (A1)
1 CC-LAST-FIRST-NAME    (A20)
1 CC-NODE-NAME          (A8)
1 CC-STATUS             (A1)
1 HIDE-DATE-TIME        (A1)
END-DEFINE
*
* Input API parameters
*
  INPUT (AD=I'_')
    // 25X '********** Z-MLGETC **********' //
    '   Cabinet' CABINET /
*
  CALLNAT 'Z-MLGETC'
    RETURN-CODE
    CABINET
    ACTIVE
    START-DATE
    START-TIME
    END-DATE
    END-TIME
    MAIL-STATUS-MESSAGE(*)
    CC-FLAG
    CC
    CC-ADDRESS-TYPE
    CC-ADDRESS-SOURCE
    CC-LAST-FIRST-NAME
    CC-NODE-NAME
    CC-STATUS
    HIDE-DATE-TIME
*
  IF RETURN-CODE EQ 0
    WRITE NOTITLE NOHDR
      '=' CABINET /
      '=' ACTIVE //
      'Mail status message :' //
      ' 1:' MAIL-STATUS-MESSAGE (1) /
      ' 2:' MAIL-STATUS-MESSAGE (2) /
      ' 3:' MAIL-STATUS-MESSAGE (3) /
      ' 4:' MAIL-STATUS-MESSAGE (4) /
      ' 5:' MAIL-STATUS-MESSAGE (5) /
      ' 6:' MAIL-STATUS-MESSAGE (6) /
      ' 7:' MAIL-STATUS-MESSAGE (7) /
      ' 8:' MAIL-STATUS-MESSAGE (8) /
      ' 9:' MAIL-STATUS-MESSAGE (9) /
      '10:' MAIL-STATUS-MESSAGE (10) //
      'Start Date:' START-DATE  5X 'Start Time:' START-TIME /
      '  End Date:' END-DATE    5X '  End Time:' END-TIME  5X
      'Mark'        HIDE-DATE-TIME ' to hide Date/Time' //
      'Mark'        CC-FLAG
      'to set CC:'  CC
      'CC Type:'    CC-ADDRESS-TYPE
      'CC Source:'  CC-ADDRESS-SOURCE
      'CC STATUS:'  CC-STATUS /
      'Last/First Name:' CC-LAST-FIRST-NAME
      'Node:'       CC-NODE-NAME
  ELSE
    WRITE '=' RETURN-CODE
  END-IF
*
END