Z-MOD05J

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-MOD05H with the exception that you can also modify the 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. Cc can be a nickname, user ID, cabinet name or bulletin board.

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-MLGETB 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-MOD05J 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.

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

0010 *********************************************************************
0020 * Modify the mail 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 PASSWORD              (A8)
0120 1 CABINET-NAME          (A8)
0130 1 CABINET-ISN           (P10)
0140 1 SET-MESSAGE           (A1)
0150 1 MAIL-STATUS-MESSAGE   (A37/1:10)
0160 1 START-DATE            (A8)
0170 1 START-TIME            (A5)
0180 1 END-DATE              (A8)
0190 1 END-TIME              (A5)
0200 1 TIMEZONE              (N2)
0210 1 CC-FLAG               (A1)
0220 1 CC                    (A20)
0230 1 CC-ADDRESS-TYPE       (N2)
0240 1 CC-ADDRESS-SOURCE     (A1)
0250 *
0260 1 #INX                  (P3)
0270 *
0280 END-DEFINE
0290 *
0300 RESET RETURN-CODE
0310 MOVE 'CABINET'  TO CABINET
0320 MOVE 'PASSWORD' TO PASSWORD
0330 MOVE 'CAB-NAME' TO CABINET-NAME
0340 MOVE 'X'        TO SET-MESSAGE
0350 FOR #INX 1 TO 10
0360   MOVE 'I''ll be back next monday' TO MAIL-STATUS-MESSAGE(#INX)
0370 END-FOR
0380 MOVE '20000117' TO START-DATE
0390 MOVE '08:00'    TO START-TIME
0400 MOVE '20000124' TO END-DATE
0410 MOVE '18:00'    TO END-TIME
0420 MOVE 1          TO TIMEZONE
0430 MOVE 'X'        TO CC-FLAG
0440 MOVE 'CAB-NEXT' TO CC
0450 MOVE 33         TO CC-ADDRESS-TYPE
0460 *
0470 CALLNAT 'Z-MOD05J'
0480     RETURN-CODE
0490     CABINET
0500     PASSWORD
0510     CABINET-NAME
0520     CABINET-ISN
0530     SET-MESSAGE
0540     MAIL-STATUS-MESSAGE(*)
0550     START-DATE
0560     START-TIME
0570     END-DATE
0580     END-TIME
0590     TIMEZONE
0600     CC-FLAG
0610     CC
0620     CC-ADDRESS-TYPE
0630     CC-ADDRESS-SOURCE
0640 *
0650   IF RETURN-CODE EQ 0
0660     WRITE 'Cabinet was modified'
0670   ELSE
0680     WRITE 'Return code' RETURN-CODE
0690   END-IF
0700 *
0710 END