With the use of user exit USR0060C, you can define nickname creation rules for addressee types where, for example, only the first 5 characters of the addressee's last and first names are used to create the nicknames.
USR0060C can be invoked either online or in batch mode, in the Natural library SYSCNT2 or SYSCNT2B, respectively. For further information, see the Con-nect Installation and Operations documentation, section Invoking Con-nect.
If this user exit is not cataloged in the current library, the import rules, as defined in the "Directory Synchronization - Add Profiles" screen, are used.
Parameter | Format | In | Out | Remarks |
---|---|---|---|---|
Addressee-type | N2 | X | 1=nickname, 4=bulletin board, 5=cabinet (public, shared or standalone), 33=private cabinet, 74=external address | |
Mail-ID | A8 | X | #1 | |
Node-name | A8 | X | #2 - Node name from which address originates | |
Last-name | A32 | X | #3 - Addressee's last name | |
First-name | A32 | X | #4 - Addressee's first name | |
CD-name | A8 | X | #5 - Name of central directory | |
Alias | A8 | X | #6 - Unique ID assigned by the system | |
Addressee | A32 | X | #7 - Addressee's name (description or name of cabinet, user's full name, nickname, bulletin board or external address) | |
Address-nickname | A20 | X | ||
Address-nickname-exc | A20 | X | Overrides the address-nickname parameter in the case of a duplicate nickname |
The following program, USR0060C, is called to create nicknames for imported addresses using the import and exception import rules.
0010 DEFINE DATA 0020 * 0030 PARAMETER 0040 * 0050 /* INPUT: 0060 1 #ADDRESSEE-TYPE (N2) /* Addressee type. The following 0070 /* values are used: 0080 /* 01 Addressee is a nickname 0090 /* 04 Addressee is a bulletin board 0100 /* 05 Addressee is a public, shared or 0110 /* standalone cabinet 0120 /* 33 Addressee is a private cabinet 0130 /* 74 Addressee is an external address 0140 /* The following fields are identical 0150 /* to those in the 'Directory 0160 /* Synchronization - Add Profile' 0170 /* screen: 0180 1 #MAIL-ID (A8) /* #1 Addressee's user ID 0190 1 #NODE-NAME (A8) /* #2 Node name from which address 0200 /* originates 0210 1 #LAST-NAME (A32) /* #3 Addressee's last name 0220 1 #FIRST-NAME (A32) /* #4 Addressee's first name 0230 1 #CD-NAME (A8) /* #5 Name of central directory 0240 1 #ALIAS (A8) /* #6 Unique ID which is assigned by 0250 /* the system 0260 1 #ADDRESSEE (A32) /* #7 Addressee's name 0270 /* OUTPUT: 0280 1 #ADDRESS-NICKNAME (A20) /* Address' nickname 0290 1 #ADDRESS-NICKNAME-EXC (A20) /* Address' nickname if in the case 0300 /* parameter address-nickname is not 0310 /* unique. 0320 END-DEFINE 0330 * 0340 RESET #ADDRESS-NICKNAME 0350 RESET #ADDRESS-NICKNAME-EXC 0360 * 0370 DECIDE FOR FIRST CONDITION 0380 WHEN #ADDRESSEE-TYPE EQ 01 /* #2 #7 0390 MOVE SUBSTRING(#NODE-NAME,1,6) TO SUBSTRING(#ADDRESS-NICKNAME,1,6) 0400 MOVE '.' TO SUBSTRING(#ADDRESS-NICKNAME,7,1) 0410 MOVE SUBSTRING(#O,1,13) TO SUBSTRING(#ADDRESS-NICKNAME,8,13) 0420 * /* #6 0430 MOVE #ALIAS TO #ADDRESS-NICKNAME-EXC 0440 * 0450 WHEN #ADDRESSEE-TYPE EQ 04 /* #2 #7 0460 MOVE SUBSTRING(#NODE-NAME,1,6) TO SUBSTRING(#ADDRESS-NICKNAME,1,6) 0470 MOVE SUBSTRING(#ADDRESSEE,1,14) TO SUBSTRING(#ADDRESS-NICKNAME,7,14) 0480 * /* #6 0490 MOVE #ALIAS TO #ADDRESS-NICKNAME-EXC 0500 * 0510 WHEN #ADDRESSEE-TYPE EQ 05 /* #7 #2 #1 0520 MOVE SUBSTRING(#OBJECT-NAME,1,8) TO SUBSTRING(#ADDRESS-NICKNAME,1,8) 0530 MOVE '.' TO SUBSTRING(#ADDRESS-NICKNAME,9,1) 0540 MOVE SUBSTRING(#NODE-NAME,1,5) TO SUBSTRING(#ADDRESS-NICKNAME,10,5) 0550 MOVE '.' TO SUBSTRING(#ADDRESS-NICKNAME,15,1) 0560 MOVE SUBSTRING(#Mail-ID,1,5) TO SUBSTRING(#ADDRESS-NICKNAME,16,5) 0570 * /* #6 0580 MOVE #ALIAS TO #ADDRESS-NICKNAME-EXC 0590 * 0600 WHEN #ADDRESSEE-TYPE EQ 33 /* #7 #4 #1 0610 MOVE SUBSTRING(#OBJECT-NAME,1,8) TO SUBSTRING(#ADDRESS-NICKNAME,1,8) 0620 MOVE '.' TO SUBSTRING(#ADDRESS-NICKNAME,9,1) 0630 MOVE SUBSTRING(#FIRST-NAME,1,4) TO SUBSTRING(#ADDRESS-NICKNAME,10,4) 0640 MOVE '.' TO SUBSTRING(#ADDRESS-NICKNAME,14,1) 0650 MOVE SUBSTRING(#Mail-ID,1,6) TO SUBSTRING(#ADDRESS-NICKNAME,15,6) 0660 * /* #6 0670 MOVE #ALIAS TO #ADDRESS-NICKNAME-EXC 0680 * 0690 WHEN #ADDRESSEE-TYPE EQ 74 /* #3 #4 #1 0700 MOVE SUBSTRING(#LAST-NAME,1,6) TO SUBSTRING(#ADDRESS-NICKNAME,1,6) 0710 MOVE '.' TO SUBSTRING(#ADDRESS-NICKNAME,7,1) 0720 MOVE SUBSTRING(#FIRST-NAME,1,6) TO SUBSTRING(#ADDRESS-NICKNAME,8,6) 0730 MOVE '.' TO SUBSTRING(#ADDRESS-NICKNAME,14,1) 0740 MOVE SUBSTRING(#Mail-ID,1,6) TO SUBSTRING(#ADDRESS-NICKNAME,15,6) 0750 * /* #6 0760 MOVE #ALIAS TO #ADDRESS-NICKNAME-EXC 0770 * 0780 WHEN NONE 0790 IGNORE 0800 END-DECIDE 0810 * 0820 END