Z-MOD05H

This document covers the following topics:


Description

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

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.

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-MOD05H 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.

Return Codes

00 Success
02 Invalid cabinet name or - in batch mode only - locked cabinet
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
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-1200&0

Example

0010 DEFINE DATA
0020 LOCAL
0030 1 RETURN-CODE         (N2)
0040 1 CABINET             (A8)
0050 1 PASSWORD            (A8)
0060 1 CABINET-NAME        (A8)
0070 1 CABINET-ISN         (P10)
0080 1 SET-MESSAGE         (A1)
0090 1 MAIL-STATUS-MESSAGE (A37/1:10)
0100 1 START-DATE          (A8)
0110 1 START-TIME          (A8)
0120 1 END-DATE            (A8)
0130 1 END-TIME            (A8)
0140 1 TIMEZONE            (N2)
0150 *
0160 1 #INX (P3)
0170 *
0180 END-DEFINE
0190 *
0200 RESET RETURN-CODE
0210 MOVE 'CABINET'   TO CABINET
0220 MOVE 'PASSWORD'  TO PASSWORD
0230 MOVE 'CAB-NAME'  TO CABINET-NAME
0240 MOVE 'X'         TO SET-MESSAGE
0250 FOR #INX 1 TO 10
0260   MOVE 'I'll be back next monday' TO MAIL-STATUS-MESSAGE(#INX)
0270 END-FOR
0280 MOVE '19960318' TO START-DATE
0290 MOVE '0800'     TO START-TIME
0300 MOVE '19960322' TO END-DATE
0310 MOVE '1800'     TO END-TIME
0320 MOVE 1          TO TIMEZONE
0330 *
0340 CALLNAT 'Z-MOD05H'
0350     RETURN-CODE
0360     CABINET
0370     PASSWORD
0380     CABINET-NAME
0390     CABINET-ISN
0400     SET-MESSAGE
0410     MAIL-STATUS-MESSAGE(*)
0420     START-DATE
0430     START-TIME
0440     END-DATE
0450     END-TIME
0460     TIMEZONE
0470 *
0480 IF RETURN-CODE = 0
0490   WRITE 'Cabinet was modified'
0500 ELSE
0510   WRITE 'Return code' RETURN-CODE
0520 END-IF
0530 *
0540 END