Z-MOD05L

This document covers the following topics:


Description

Modify the mail status message in the user profile of a specific cabinet.

This subprogram is similar to Z-MOD05J with the exception that you can also specify that the time range is not to be shown when the mail status message is displayed.

This subprogram can be used by a supervisor, cabinet administrator, user of a private cabinet, or by a shared user who is authorized to modify the mail status message. It is not possible to use this subprogram to modify the user profile of the cabinet SYSCNT.

To get the ISN for the wanted cabinet, you can invoke either Z-ADD05 or Z-DIS05 prior to this subprogram.

To fill the parameters with the already existing mail status message values, you can invoke Z-MLGETC prior to this subprogram.

Parameters which are not completed in the parameter list are deleted from the user profile. Thus, to retain the existing values, you must specify them once more before you invoke this subprogram.

The date range between Start-date and End-date must be equal to or less than 1095 days (otherwise the return code 43 is issued). Start-date and End-date are computed according to the given time zone.

If a time zone is not specified, the Start-time and End-time are interpreted as GMT (0). If these values are to be put into a different time zone, the difference must be entered into the parameter Timezone.

If Start-time and End-time are not specified, the time range from 0:00 to 23:59 is automatically provided. In this case, the mail status message appears during the entire day.

Successful termination of Z-MOD05L always results in an END TRANSACTION. You are not able to control transaction handling.

Parameters

Parameter Format In Out Remarks
Return-code N2   X  
Cabinet A8 R   The cabinet ID of a supervisor, cabinet administrator, private cabinet, or of a shared user who is authorized to modify the mail status message.
Password A8 R   The password of the above cabinet.
Cabinet-name A8 R*   The name of the cabinet to be modified. Either Cabinet-name or Cabinet-ISN, not both.
Cabinet-ISN P10 R*   The ISN of the cabinet to be modified. Either Cabinet-ISN or Cabinet-name, not both.
Set-message A1 O   If marked, the mail status message is displayed when another user sends mail to this cabinet.
Mail-status-message A37/1:10 O   The message that is to be displayed when another user sends mail to this cabinet. When you do not specify a message, a previously defined message will be deleted.
Start-date A8 R   The (starting) date for the mail status message. Format yyyymmdd.
Start-time A8 O   The starting time for the mail status message. Format hhmm.
End-date A8 O   The ending date for the mail status message. It must not occur later than 3 years (1095 days) after the starting date. Format yyyymmdd.
End-time A8 O   The ending time for the mail status message. Format hhmm.
Timezone N2 O   Default: 0 (GMT). Values -12 to +11.
Cc-flag A1 O   Mark to activate Cc.
Cc A20 O   Address, cabinet, user ID of addressee, or bulletin board to receive copy of mail.
Cc-address-type N2 O   If Cc is specified, this must be one of the following: 1=address (nickname), 4=bulletin board, 5=cabinet, 33=user ID.
Cc-address-source A1 O   Only if Cc-address-type is 1 (address): S=address is from cabinet SYSCNT. Blank=address is from Cabinet-name.
Hide-date-time A1 O   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
03 Password incorrect
08 Supply either ISN or name, not both
15 Invalid administrator status
41 Invalid start-date
42 Invalid start-time
43 Invalid end-date
44 Invalid end-time
47 Invalid timezone
91 Supply Cabinet-name or Cabinet-ISN
94 Invalid Cc
95 Cc was not found
96 Cabinet-name is not valid
97 Cabinet-ISN is not valid
99 Cabinet SYSCNT cannot be modified

Subprograms

N-IDATCM
Z-GETMSM
Z-0106C
Z-120
Z-122
Z-123
Z-160
Z-175
Z-723
Z-1200&0

Example

***********************************************************************
* Modify the mail status message of a user
***********************************************************************
*
DEFINE DATA
*
LOCAL
*
1 RETURN-CODE           (N2)
1 CABINET               (A8)
1 PASSWORD              (A8)
1 CABINET-NAME          (A8)
1 CABINET-ISN           (P10)
1 SET-MESSAGE           (A1)
1 MAIL-STATUS-MESSAGE   (A37/1:10)
1 START-DATE            (A8)
1 START-TIME            (A5)
1 END-DATE              (A8)
1 END-TIME              (A5)
1 TIMEZONE              (N2)
1 CC-FLAG               (A1)
1 CC                    (A20)
1 CC-ADDRESS-TYPE       (N2)
1 CC-ADDRESS-SOURCE     (A1)
1 HIDE-DATE-TIME        (A1)
*
1 #INX                  (P3)
*
END-DEFINE
*
RESET RETURN-CODE
MOVE 'CABINET'  TO CABINET
MOVE 'PASSWORD' TO PASSWORD
MOVE 'CAB-NAME' TO CABINET-NAME
MOVE 'X'        TO SET-MESSAGE
FOR #INX 1 TO 10
  MOVE 'I''ll be back next monday' TO MAIL-STATUS-MESSAGE(#INX)
END-FOR
MOVE '20020126' TO START-DATE
MOVE '08:00'    TO START-TIME
MOVE '20020204' TO END-DATE
MOVE '18:00'    TO END-TIME
MOVE 1          TO TIMEZONE
MOVE 'X'        TO CC-FLAG
MOVE 'ESH'      TO CC
MOVE 33         TO CC-ADDRESS-TYPE
MOVE 'X'        TO HIDE-DATE-TIME
*
CALLNAT 'Z-MOD05L'
  RETURN-CODE
  CABINET
  PASSWORD
  CABINET-NAME
  CABINET-ISN
  SET-MESSAGE
  MAIL-STATUS-MESSAGE(*)
  START-DATE
  START-TIME
  END-DATE
  END-TIME
  TIMEZONE
  CC-FLAG
  CC
  CC-ADDRESS-TYPE
  CC-ADDRESS-SOURCE
  HIDE-DATE-TIME
*
  IF RETURN-CODE EQ 0
    WRITE 'Cabinet' CABINET-NAME 'was modified'
  ELSE
    WRITE 'Return code' RETURN-CODE
  END-IF
*
END