Z-MOD05A

This document covers the following topics:


Description

Modify the date and time formats in the user profile of a specific cabinet.

This subprogram can be used only by a supervisor or cabinet administrator. 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.

The sequence of the values 1 to 5 in the Date-format parameter defines the order in which the day, month and year appear in all screens. The values mean:

1 The day is shown as a number.
2 The month is shown as a number.
3 The year is shown as a two-digit number.
4 The month is shown as a three-letter abbreviation.
5 The year is shown as a four-digit number.

A delimiter separates the day, month and year values. You can use any character, including blank. For example, when you specify the values 1.4.3 in the parameter Date-format, the date appears as 24.Dec.93 in all screens - when you specify the values 4 1,5 in the parameter Date-format, the date appears as Dec 24,1993 in all screens.

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.

Successful termination of Z-MOD05A 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 or cabinet administrator.
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 P8 R*   The ISN of the cabinet to be modified. Either Cabinet-ISN or Cabinet-name, not both.
Date-format A5 O   See the description above. In case of an invalid Date-format (i.e. if a day (1) and month (2 or 4) has not been specified), the default date format 1.2.3 is used.
Time-format N1 R   0=24 hour, 1=am/pm
Time-delimiter A1 O   Character to separate hours and minutes. You can use any character.
Timezone N2 O   The timezone in which the user is located, relative to the CPU's timezone. The sum of the CPU's and user's timezone must be within the range of -12 through +11. For example, if the CPU's timezone is -5 and a value of +16 is specified in this parameter, it is valid since the sum is +11. Default: 0 (CPU).
Week-start N1 R   Values 1 to 7 specify the first day of the week to be shown in the Con-nect menu and the calendar screens. 1=Monday, 2=Tuesday ... 7=Sunday.
Day-start N4 R   Values 0 to 23 specify the start of a 10-hour period which includes the user's working day. 0=midnight ... 9=9:00 am ... 13=1:00 pm ...

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
47 Invalid timezone (range -12 to +11)
91 Supply Cabinet-name or Cabinet-ISN
94 Invalid Time-format
95 Invalid Day-start
96 Cabinet-name is not valid
97 Cabinet-ISN is not valid
98 Invalid Week-start
99 Cabinet SYSCNT cannot be modified

Subprograms

Z-120
Z-122
Z-123
Z-1200&0

Example

0010 *
0020 * Example program to modify date and time formats
0030 *
0040 *
0050 DEFINE DATA
0060 LOCAL
0070 1 RETURN-CODE       (N2)
0080 1 CABINET           (A8)
0090 1 PASSWORD          (A8)
0100 1 CABINET-NAME      (A8)
0110 1 CABINET-ISN       (P8)
0120 1 DATE-FORMAT       (A5)
0130 1 TIME-FORMAT       (N1)
0140 1 TIME-DELIMITER    (A1)
0150 1 TIMEZONE          (N2)
0160 1 WEEK-START        (N1)
0170 1 DAY-START         (N4)
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 '1.2.3'        TO DATE-FORMAT
0250 MOVE 1              TO TIME-FORMAT
0260 MOVE ':'            TO TIME-DELIMITER
0270 MOVE -1             TO TIMEZONE
0280 MOVE 1              TO WEEK-START
0290 MOVE 9              TO DAY-START
0300 *
0310 CALLNAT 'Z-MOD05A'
0320     RETURN-CODE
0330     CABINET
0340     PASSWORD
0350     CABINET-NAME
0360     CABINET-ISN
0370     DATE-FORMAT
0380     TIME-FORMAT
0390     TIME-DELIMITER
0400     TIMEZONE
0410     WEEK-START
0420     DAY-START
0430 *
0440 IF RETURN-CODE = 0
0450   WRITE 'CABINET WAS MODIFIED'
0460 ELSE
0470   WRITE 'RETURN CODE' RETURN-CODE
0480 END-IF
0490 *
0500 END