Z-MOD05I

This document covers the following topics:


Description

Modify the date and time formats and the sliding window (YSLW) value 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.98 in all screens - when you specify the values 4 1,5 in the parameter Date-format, the date appears as Dec 24,1998 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-MOD05I 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 ...
Use-system-SLW A1 R*   If marked, the value of the sliding window defined in the system defaults is used. Either Use-system-SLW or Sliding-window, not both.
Sliding-window A2 R*   A value between 0 and 99. Either Sliding-window or Use-system-SLW, not both.

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)
90 Either Use-system-SLW or Sliding-window, not both.
91 Supply Cabinet-name or Cabinet-ISN
93 Invalid Sliding-window value
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 Example program to modify date and time formats.
0020 *
0030 DEFINE DATA
0040 LOCAL
0050 *
0060 1 RETURN-CODE      (N2)
0070 1 CABINET          (A8)
0080 1 PASSWORD         (A8)
0090 1 CABINET-NAME     (A8)
0100 1 CABINET-ISN      (P8)
0110 1 DATE-FORMAT      (A5)
0120 1 TIME-FORMAT      (N1)
0130 1 TIME-DELIMITER   (A1)
0140 1 TIMEZONE         (N2)
0150 1 WEEK-START       (N1)
0160 1 DAY-START        (N4)
0170 1 USE-SYSTEM-SLW   (A1)
0180 1 SLIDING-WINDOW   (N2)
0190 END-DEFINE
0200 *
0210 RESET RETURN-CODE
0220 MOVE 'CABINET ' TO CABINET
0230 MOVE 'PASSWORD' TO PASSWORD
0240 MOVE 'CAB-NAME' TO CABINET-NAME
0250 MOVE '1.2.3'    TO DATE-FORMAT
0260 MOVE  1         TO TIME-FORMAT
0270 MOVE ':'        TO TIME-DELIMITER
0280 MOVE -1         TO TIMEZONE
0290 MOVE  1         TO WEEK-START
0300 MOVE  9         TO DAY-START
0310 RESET           USE-SYSTEM-SLW
0320 MOVE  95        TO SLIDING-WINDOW
0330 *
0340 CALLNAT 'Z-MOD05I' RETURN-CODE
0350   CABINET
0360   PASSWORD
0370   CABINET-NAME
0380   CABINET-ISN
0390   DATE-FORMAT
0400   TIME-FORMAT
0410   TIME-DELIMITER
0420   TIMEZONE
0430   WEEK-START
0440   DAY-START
0450   USE-SYSTEM-SLW
0460   SLIDING-WINDOW
0470 *
0480 WRITE
0490   / '='  CABINET
0500   / '='  PASSWORD
0510   / '='  CABINET-NAME
0520   / '='  CABINET-ISN
0530   / '='  DATE-FORMAT
0540   / '='  TIME-FORMAT
0550   / '='  TIME-DELIMITER
0560   / '='  TIMEZONE
0570   / '='  WEEK-START
0580   / '='  DAY-START
0590   / '='  USE-SYSTEM-SLW
0600   / '='  SLIDING-WINDOW /
0610 *
0620 IF RETURN-CODE EQ 0
0630  WRITE 'Cabinet was modified'
0640 ELSE
0650  WRITE 'Return code' RETURN-CODE
0660 END-IF
0670 *
0680 END