Z-MOD01D

This document covers the following topics:


Description

Modify the work and home address for a cabinet or nickname.

This subprogram is similar to Z-MOD01C with the exception that you can also modify the Cc and Miscellaneous information. In addition, the parameter list contains new fields and the parameters are sorted according to their appearance in the online screen. Exception: Last-name, First-name, Initial and Sex are sorted differently in the parameter list.

The Cc parameters are only valid for cabinets (object number 5). For nicknames (object number 1) they are ignored.

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-GET01D prior to invoking Z-MOD01D (see the following example program).

Parameters

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-GET01D prior to Z-MOD01D 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 or external address. The initial of a user.
Sex A10 O   Valid only for a private cabinet or external address.
Nickname-for A44 O   Valid only for a nickname. Last name and first name delimited by a comma.
Work-company A32 O    
Work-title A32 O    
Work-department-name A32 O    
Work-department-number A10 O    
Work-location A32 O    
Work-address A60/1:3 O    
Work-city A32 O    
Work-state A8 O    
Work-postal-code A10 O    
Work-country A8 O    
Work-phone-1-country N3 O    
Work-phone-1 A15 O    
Work-phone-1-extension A5 O    
Work-phone-2-country N3 O    
Work-phone-2 A15 O    
Work-phone-2-extension A5 O    
Mobile-phone-country N3 O    
Mobile-phone A15 O    
Mobile-phone-extension A5 O    
Fax-country N3 O    
Fax A15 O    
Fax-extension A5 O    
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.
Cc-2-flag A1 O   Mark to activate Cc-2.
Cc-2 A20 O   Address, cabinet, user ID of addressee, or bulletin board to receive copy of mail.
Cc-2-address-type N2 O   If Cc-2 is specified, this must be one of the following: 1=address (nickname), 4=bulletin board, 5=cabinet, 33=user ID.
Cc-2-address-source A1 O   Only if Cc-2-address-type is 1 (address): S=address is from cabinet SYSCNT. Blank=address is from Cabinet-name.
E-mail A64 O    
Internet A64 O    
Home-address A60/1:2 O    
Home-city A32 O    
Home-state A8 O    
Home-postal-code A10 O    
Home-country A8 O    
Home-phone-country N3 O    
Home-phone A15 O    
Home-phone-extension A5 O    
Home-fax-country N3 O    
Home-fax A15 O    
Home-fax-extension A5 O    
Home-e-mail A64 O    
Miscellaneous-header A12/1:6 O    
Miscellaneous-description A64/1:6 O    

Return Codes

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 Supply either Cabinet-name or Nickname
94 Invalid input in the parameter Nickname-for
95 Invalid input in the parameter Cc-address-type
96 Cc was not found
97 Invalid input in the parameter Cc-2-address-type
98 Cc-2 was not found

Subprograms

N-UPDNAM
Z-120
Z-122
Z-123
Z-175
Z-206
Z-562
Z-710
Z-723
Z-1200&0

Example

0010 *
0020 * Example program to set headers of Miscellaneous
0030 * for all nicknames in cabinet MYCAB
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-GET01D
0140 1 PRIVATE-FLAG           (A1)     /* used by Z-GET01D
0150 1 LAST-NAME              (A32)
0160 1 FIRST-NAME             (A32)
0170 1 INITIAL                (A1)
0180 1 SEX                    (A10)
0190 1 NICKNAME-FOR           (A44)
0200 1 NICKNAME-STATUS        (N1)     /* used by Z-GET01D
0210 1 NICKNAME-ORIGIN        (A8)     /* used by Z-GET01D
0220 1 WORK-COMPANY           (A32)
0230 1 WORK-TITLE             (A32)
0240 1 WORK-DEPARTMENT-NAME   (A32)
0250 1 WORK-DEPARTMENT-NUMBER (A10)
0260 1 WORK-LOCATION          (A32)
0270 1 WORK-ADDRESS           (A60/1:3)
0280 1 WORK-CITY              (A32)
0290 1 WORK-STATE             (A8)
0300 1 WORK-POSTAL-CODE       (A10)
0310 1 WORK-COUNTRY           (A8)
0320 1 WORK-PHONE-1-COUNTRY   (N3)
0330 1 WORK-PHONE-1           (A15)
0340 1 WORK-PHONE-1-EXTENSION (A5)
0350 1 WORK-PHONE-2-COUNTRY   (N3)
0360 1 WORK-PHONE-2           (A15)
0370 1 WORK-PHONE-2-EXTENSION (A5)
0380 1 MOBILE-PHONE-COUNTRY   (N3)
0390 1 MOBILE-PHONE           (A15)
0400 1 MOBILE-PHONE-EXTENSION (A5)
0410 1 FAX-COUNTRY            (N3)
0420 1 FAX                    (A15)
0430 1 FAX-EXTENSION          (A5)
0440 1 CC-FLAG                (A1)
0450 1 CC                     (A20)
0460 1 CC-ADDRESS-TYPE        (N2)
0470 1 CC-ADDRESS-SOURCE      (A1)
0475 1 CC-LAST-FIRST-NAME     (A20)      /* used by Z-GET01D
0480 1 CC-NODE-NAME           (A8)       /* used by Z-GET01D
0485 1 CC-STATUS              (A1)       /* used by Z-GET01D
0490 1 CC-2-FLAG              (A1)
0500 1 CC-2                   (A20)
0510 1 CC-2-ADDRESS-TYPE      (N2)
0520 1 CC-2-ADDRESS-SOURCE    (A1)
0525 1 CC-2-LAST-FIRST-NAME   (A20)      /* used by Z-GET01D
0530 1 CC-2-NODE-NAME         (A8)       /* used by Z-GET01D
0535 1 CC-2-STATUS            (A1)       /* used by Z-GET01D
0540 1 E-MAIL                 (A64)
0550 1 INTERNET               (A64)
0560 1 HOME-ADDRESS           (A60/1:2)
0570 1 HOME-CITY              (A32)
0580 1 HOME-STATE             (A8)
0590 1 HOME-POSTAL-CODE       (A10)
0600 1 HOME-COUNTRY           (A8)
0610 1 HOME-PHONE-COUNTRY     (N3)
0620 1 HOME-PHONE             (A15)
0630 1 HOME-PHONE-EXTENSION   (A5)
0640 1 HOME-FAX-COUNTRY       (N3)
0650 1 HOME-FAX               (A15)
0660 1 HOME-FAX-EXTENSION     (A5)
0670 1 HOME-E-MAIL            (A64)
0680 1 MISCELLANEOUS-HEADER   (A12/1:6)
0690 1 MISCELLANEOUS-DESCRIPTION (A64/1:6)
0700 1 WORK-PARAMETER         (A83)     /* used by Z-GET01D
0710 *
0720 1 #RETURN-CODE           (N2)
0730 END-DEFINE
0740 *
0750 MOVE 'MYCAB   ' TO CABINET
0760 MOVE 'MYPASSW ' TO PASSWORD
0770 MOVE '*       ' TO NICKNAME
0780 REPEAT 
0790   RESET RETURN-CODE 
0800   CALLNAT 'Z-GET01D' RETURN-CODE
0810                      CABINET
0820                      PASSWORD
0830                      CABINET-NAME
0840                      NICKNAME
0850                      OBJECT-ISN
0860                      OBJECT-NUMBER
0870                      PRIVATE-FLAG
0880                      LAST-NAME
0890                      FIRST-NAME
0900                      INITIAL
0910                      SEX
0920                      NICKNAME-FOR
0930                      NICKNAME-STATUS
0940                      NICKNAME-ORIGIN
0950                      WORK-COMPANY
0960                      WORK-TITLE
0970                      WORK-DEPARTMENT-NAME
0980                      WORK-DEPARTMENT-NUMBER
0990                      WORK-LOCATION
1000                      WORK-ADDRESS(1:3)
1010                      WORK-CITY
1020                      WORK-STATE
1030                      WORK-POSTAL-CODE
1040                      WORK-COUNTRY
1050                      WORK-PHONE-1-COUNTRY
1060                      WORK-PHONE-1
1070                      WORK-PHONE-1-EXTENSION
1080                      WORK-PHONE-2-COUNTRY
1090                      WORK-PHONE-2
1100                      WORK-PHONE-2-EXTENSION
1110                      MOBILE-PHONE-COUNTRY
1120                      MOBILE-PHONE
1130                      MOBILE-PHONE-EXTENSION
1140                      FAX-COUNTRY
1150                      FAX
1160                      FAX-EXTENSION
1170                      CC-FLAG
1180                      CC
1190                      CC-ADDRESS-TYPE
1200                      CC-ADDRESS-SOURCE
1205                      CC-LAST-FIRST-NAME
1210                      CC-NODE-NAME
1215                      CC-STATUS
1220                      CC-2-FLAG
1230                      CC-2
1240                      CC-2-ADDRESS-TYPE
1250                      CC-2-ADDRESS-SOURCE
1255                      CC-2-LAST-FIRST-NAME
1260                      CC-2-NODE-NAME
1265                      CC-2-STATUS
1270                      E-MAIL
1280                      INTERNET
1290                      HOME-ADDRESS(1:2)
1300                      HOME-CITY
1310                      HOME-STATE
1320                      HOME-POSTAL-CODE
1330                      HOME-COUNTRY
1340                      HOME-PHONE-COUNTRY
1350                      HOME-PHONE
1360                      HOME-PHONE-EXTENSION
1370                      HOME-FAX-COUNTRY
1380                      HOME-FAX
1390                      HOME-FAX-EXTENSION
1400                      HOME-E-MAIL
1410                      MISCELLANEOUS-HEADER(1:6)
1420                      MISCELLANEOUS-DESCRIPTION(1:6)
1430                      WORK-PARAMETER
1440 *
1450   MOVE RETURN-CODE TO #RETURN-CODE
1460   IF RETURN-CODE EQ 0   OR
1470      RETURN-CODE EQ 77
1480     RESET RETURN-CODE
1490 *
1500   IF MISCELLANEOUS-HEADER(1:6) = ' ' AND MISCELLANEOUS-DESCRIPTION(1:6) = ' '
1510     MOVE RIGHT JUSTIFIED 'Manager'   TO MISCELLANEOUS-HEADER(1)
1520     MOVE RIGHT JUSTIFIED 'Birthday'  TO MISCELLANEOUS-HEADER(2)
1530     MOVE RIGHT JUSTIFIED 'Hobby'     TO MISCELLANEOUS-HEADER(3)
1540     MOVE RIGHT JUSTIFIED 'Assistant' TO MISCELLANEOUS-HEADER(4)
1550     MOVE RIGHT JUSTIFIED 'Spouse'    TO MISCELLANEOUS-HEADER(5)
1560     MOVE RIGHT JUSTIFIED 'Children'  TO MISCELLANEOUS-HEADER(6)
1570 *
1580     CALLNAT 'Z-MOD01D' RETURN-CODE
1590                        CABINET
1600                        PASSWORD
1610                        CABINET-NAME
1620                        NICKNAME
1630                        OBJECT-ISN
1640                        LAST-NAME
1650                        FIRST-NAME
1660                        INITIAL
1670                        SEX
1680                        NICKNAME-FOR
1690                        WORK-COMPANY
1700                        WORK-TITLE
1710                        WORK-DEPARTMENT-NAME
1720                        WORK-DEPARTMENT-NUMBER
1730                        WORK-LOCATION
1740                        WORK-ADDRESS(1:3)
1750                        WORK-CITY
1760                        WORK-STATE
1770                        WORK-POSTAL-CODE
1780                        WORK-COUNTRY
1790                        WORK-PHONE-1-COUNTRY
1800                        WORK-PHONE-1
1810                        WORK-PHONE-1-EXTENSION
1820                        WORK-PHONE-2-COUNTRY
1830                        WORK-PHONE-2
1840                        WORK-PHONE-2-EXTENSION
1850                        MOBILE-PHONE-COUNTRY
1860                        MOBILE-PHONE
1870                        MOBILE-PHONE-EXTENSION
1880                        FAX-COUNTRY
1890                        FAX
1900                        FAX-EXTENSION
1910                        CC-FLAG
1920                        CC
1930                        CC-ADDRESS-TYPE
1940                        CC-ADDRESS-SOURCE
1950                        CC-2-FLAG
1960                        CC-2
1970                        CC-2-ADDRESS-TYPE
1980                        CC-2-ADDRESS-SOURCE
1990                        E-MAIL
2000                        INTERNET
2010                        HOME-ADDRESS(1:2)
2020                        HOME-CITY
2030                        HOME-STATE
2040                        HOME-POSTAL-CODE
2050                        HOME-COUNTRY
2060                        HOME-PHONE-COUNTRY
2070                        HOME-PHONE
2080                        HOME-PHONE-EXTENSION
2090                        HOME-FAX-COUNTRY
2100                        HOME-FAX
2110                        HOME-FAX-EXTENSION
2120                        HOME-E-MAIL
2130                        MISCELLANEOUS-HEADER(1:6)
2140                        MISCELLANEOUS-DESCRIPTION(1:6)
2150       IF RETURN-CODE NE 0
2160         WRITE 'Z-MOD01D failed. Return code:' RETURN-CODE
2170       ELSE
2180         WRITE 'Misc. changed in Nickname' NICKNAME 'Cabinet' CABINET
2190       END-IF
2200   END-IF
2210   END-IF
2220   IF #RETURN-CODE EQ 77
2230     ESCAPE BOTTOM
2240   END-IF
2250 END-REPEAT
2260 END