This document covers the following topics:
Modify the work and home address for a cabinet or nickname.
This subprogram is similar to Z-MODADR with the exception that you can also modify the last name, initial and first name of a cabinet, or the last name and first name of a nickname.
This subprogram can be used by different types of users. Depending on the type of user, the following functions are allowed:
Cabinet Administrator
Modify the address for a cabinet (except for cabinet SYSCNT), or for a
nickname in the cabinet administrator's own private cabinet.
System Administrator
Modify the address for cabinet SYSCNT, for a nickname in cabinet
SYSCNT, or for a nickname in the system administrator's own private
cabinet.
Any Other User
Modify the address for a nickname in the user's own private
cabinet.
This subprogram also modifies the addresses for nicknames in cabinets that the above listed users are authorized to use (for example, shared cabinets and public cabinets).
You must specify at least one of the following parameters: Cabinet-name, Nickname or Object-ISN. Thus, the following combinations are allowed: Cabinet-name and Object-ISN, Nickname and Object-ISN, only the Cabinet-name, only the Nickname, or only the Object-ISN.
The following table shows the parameters that are used for the different functions of this subprogram (the table does not consider the Object-ISN):
Function | Cabinet | Cabinet-name | Nickname |
---|---|---|---|
Modify the address for a cabinet (except for cabinet SYSCNT). | User ID of a cabinet administrator. | The name of the cabinet to be modified. | |
Modify the address for cabinet SYSCNT. | User ID of a system administrator. | The cabinet name "SYSCNT". | |
Modify a nickname in cabinet SYSCNT. | The cabinet name "SYSCNT" (for system administrators only). | The nickname to be modified. | |
Modify a nickname from the user's private cabinet or from a cabinet that the user is authorized to use. | The name of the cabinet in which the nickname is stored. | The nickname to be modified. |
Parameters which are not completed in the parameter list are deleted from the address. Thus, to retain the existing values, you must specify them once more before you invoke this subprogram.
To fill the parameters with the already existing address values, it is recommended that you invoke Z-GET01C prior to invoking Z-MOD01C (see the following example program).
Parameter | Format | In | Out | Remarks |
---|---|---|---|---|
Return-code | N2 | O | X | Input -1: no ET. |
Cabinet | A8 | R | To modify the address for a cabinet, this must be the user ID of a cabinet administrator. To modify the nickname, this must be the ID of the cabinet in which the nickname is stored. System administrators can use "SYSCNT" to modify addresses or nicknames in cabinet SYSCNT (see the above table). | |
Password | A8 | R | The password of the above cabinet. | |
Cabinet-name | A8 | R/O* | The name of the cabinet to be modified. Either Cabinet-name or Nickname, not both. | |
Nickname | A32 | R/O* | The nickname to be modified. Either Nickname or Cabinet-name, not both. | |
Object-ISN | P10 | R/O | The ISN of the cabinet or nickname to be modified. You can invoke Z-GET01C prior to Z-MOD01C to obtain the ISN for the desired cabinet or nickname. The Object-ISN can either be specified alone, or in addition to Cabinet-name or Nickname. In the latter case, the Object-ISN must correspond to the Cabinet-name or Nickname, otherwise return code 4 is issued. | |
Last-name | A32 | O | Valid only for a cabinet or external address. The last name of a user. | |
First-name | A32 | O | Valid only for a private cabinet or external address. The first name of a user. | |
Initial | A1 | O | Valid only for a private cabinet. The initial of a user. | |
Nickname-for | A44 | O | Valid only for a nickname. Last name and first name delimited by a comma. | |
Work-title | A32 | O | ||
Work-company | A32 | O | ||
Work-location | A32 | O | ||
Work-address | A60/1:3 | O | ||
Work-city | A32 | O | ||
Work-country | A8 | O | ||
Work-department-name | A32 | O | ||
Work-department-number | A10 | O | ||
Work-phone | A15 | O | ||
Work-phone-country | N2 | O | ||
Work-phone-extension | A10 | O | ||
Work-postal-code | A10 | O | ||
Work-state | A8 | O | ||
Home-address | A60/1:2 | O | ||
Home-city | A32 | O | ||
Home-country | A8 | O | ||
Home-phone | A15 | O | ||
Home-phone-country | N2 | O | ||
Home-postal-code | A10 | O | ||
Home-state | A8 | O |
00 | Success |
02 | Invalid cabinet name or - in batch mode only - locked cabinet |
03 | Password incorrect |
04 | ISN was not found |
09 | ISN does not point to correct object |
15 | Invalid administrator status |
53 | Requested object does not exist |
91 | Invalid input in the parameter Cabinet-name or Nickname |
92 | Supply either Cabinet-name or Nickname, not both |
93 | Either Cabinet-name or Nickname must be supplied |
94 | Incorrect value for Nickname-for |
N-UPDNAM
Z-120
Z-122
Z-123
Z-175
Z-206
Z-562
Z-710
Z-1200&0
0010 * Example program: a cabinet administrator modifies all 0020 * cabinet addresses. The program substitutes the old German 0030 * zip codes (PLZ) with the new five-character zip codes. 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 NICKNAME (A32) 0120 1 OBJECT-ISN (P10) 0130 1 OBJECT-NUMBER (N2) /* used by Z-GET01C 0140 1 PRIVATE-FLAG (A1) /* used by Z-GET01C 0150 1 LAST-NAME (A32) 0160 1 FIRST-NAME (A32) 0170 1 INITIAL (A1) 0180 1 NICKNAME-FOR (A44) 0190 1 NICKNAME-STATUS (N1) /* used by Z-GET01C 0200 1 NICKNAME-ORIGIN (A8) /* used by Z-GET01C 0210 1 WORK-TITLE (A32) 0220 1 WORK-COMPANY (A32) 0230 1 WORK-LOCATION (A32) 0240 1 WORK-ADDRESS (A60/1:3) 0250 1 WORK-CITY (A32) 0260 1 WORK-COUNTRY (A8) 0270 1 WORK-DEPARTMENT-NAME (A32) 0280 1 WORK-DEPARTMENT-NUMBER (A10) 0290 1 WORK-PHONE (A15) 0300 1 WORK-PHONE-COUNTRY (N2) 0310 1 WORK-PHONE-EXTENSION (A10) 0320 1 WORK-POSTAL-CODE (A10) 0330 1 WORK-STATE (A8) 0340 1 HOME-ADDRESS (A60/1:2) 0350 1 HOME-CITY (A32) 0360 1 HOME-COUNTRY (A8) 0370 1 HOME-PHONE (A15) 0380 1 HOME-PHONE-COUNTRY (N2) 0390 1 HOME-POSTAL-CODE (A10) 0400 1 HOME-STATE (A8) 0410 1 WORK-PARAMETER (A83) /* used by Z-GET01C 0420 * 0430 1 TABLE-DA (A30/2) INIT 0440 (1) <'Haardtring 64295'> 0450 (2) <'Friedberger 64289'> 0460 1 REDEFINE TABLE-DA 0470 2 STRING (2) 0480 3 STREET (A20) 0490 3 PLZ (A5) 0500 1 IND (N2) 0510 1 #RETURN-CODE (N2) 0520 1 #COUNTER (N3) 0530 END-DEFINE 0540 * 0550 MOVE 'DBA ' TO CABINET 0560 MOVE 'DBA ' TO PASSWORD 0570 MOVE '*' TO CABINET-NAME /* all cabinets 0580 REPEAT 0590 RESET RETURN-CODE 0600 CALLNAT 'Z-GET01C' RETURN-CODE 0610 CABINET 0620 PASSWORD 0630 CABINET-NAME 0640 NICKNAME 0650 OBJECT-ISN 0660 OBJECT-NUMBER 0670 PRIVATE-FLAG 0680 LAST-NAME 0690 FIRST-NAME 0700 INITIAL 0710 NICKNAME-FOR 0720 NICKNAME-STATUS 0730 NICKNAME-ORIGIN 0740 WORK-TITLE 0750 WORK-COMPANY 0760 WORK-LOCATION 0770 WORK-ADDRESS(1:3) 0780 WORK-CITY 0790 WORK-COUNTRY 0800 WORK-DEPARTMENT-NAME 0810 WORK-DEPARTMENT-NUMBER 0820 WORK-PHONE 0830 WORK-PHONE-COUNTRY 0840 WORK-PHONE-EXTENSION 0850 WORK-POSTAL-CODE 0860 WORK-STATE 0870 HOME-ADDRESS(1:2) 0880 HOME-CITY 0890 HOME-COUNTRY 0900 HOME-PHONE 0910 HOME-PHONE-COUNTRY 0920 HOME-POSTAL-CODE 0930 HOME-STATE 0940 WORK-PARAMETER 0950 * 0960 MOVE RETURN-CODE TO #RETURN-CODE 0970 IF RETURN-CODE EQ 0 OR 0980 RETURN-CODE EQ 77 0990 RESET RETURN-CODE 1000 * 1010 PERFORM FILL-PLZ /* see the subroutine at the end of this program 1020 * 1030 CALLNAT 'Z-MOD01C' RETURN-CODE 1040 CABINET /* system administrators can also use NICKNAME-ORIGIN 1050 PASSWORD 1060 CABINET-NAME 1070 NICKNAME 1080 OBJECT-ISN 1090 LAST-NAME 1100 FIRST-NAME 1110 INITIAL 1120 NICKNAME-FOR 1130 WORK-TITLE 1140 WORK-COMPANY 1150 WORK-LOCATION 1160 WORK-ADDRESS(1:3) 1170 WORK-CITY 1180 WORK-COUNTRY 1190 WORK-DEPARTMENT-NAME 1200 WORK-DEPARTMENT-NUMBER 1210 WORK-PHONE 1220 WORK-PHONE-COUNTRY 1230 WORK-PHONE-EXTENSION 1240 WORK-POSTAL-CODE 1250 WORK-STATE 1260 HOME-ADDRESS(1:2) 1270 HOME-CITY 1280 HOME-COUNTRY 1290 HOME-PHONE 1300 HOME-PHONE-COUNTRY 1310 HOME-POSTAL-CODE 1320 HOME-STATE 1330 END-IF 1340 IF RETURN-CODE EQ 0 1350 ADD 1 TO #COUNTER 1360 END-IF 1370 UNTIL #RETURN-CODE NE 77 1380 END-REPEAT 1390 * 1400 WRITE #COUNTER ' addresses were modified' 1410 * 1420 * 1430 DEFINE SUBROUTINE FILL-PLZ 1440 * 1450 IF WORK-CITY EQ SCAN 'Darmstadt' 1460 FOR IND 1 TO 2 1470 IF WORK-ADDRESS(*) EQ SCAN STREET(IND) 1480 MOVE PLZ(IND) TO WORK-POSTAL-CODE 1490 END-IF 1500 END-FOR 1510 END-IF 1520 * 1530 END-SUBROUTINE 1540 * 1550 END