Z-ADD01B

This document covers the following topics:


Description

Add a nickname for an address at an external node or for an internal Con-nect address. This subprogram applies only to an external node which uses the spool file.

This subprogram does not apply to a transport service node. To add a nickname for a transport service node, you must use Z-ADD01T.

This subprogram is similar to Z-ADD01A with the one exception that you can also add a nickname for an internal Con-nect user.

The internal address can be one of the following: last name or user ID of a Con-nect user, a distribution list, a bulletin board or a cabinet.

You can also add a nickname for an already existing nickname (for example, if the nickname which has been defined by the administrator is difficult to remember); in this case you specify the Address-type 1.

When you add a nickname for an external address, you specify the parameters Node-name, Node-parameters, Parameter-length, Post-flag and Work-address. You must not specify the parameter Object-name.

If you know the Node-name, but do not know the physical address of the external node (Node-parameters) which has been defined by the administrator, you can invoke Z-GET74 prior to Z-ADD01B to obtain the physical address information.

This subprogram does not check whether the information you specify in the Node-parameters corresponds to the information which has been defined by the administrator. Thus, you can specify different address information in the Node-parameters. However, it is your responsibility to specify the correct information.

When you add a nickname for an internal address, you must specify the parameter Object-name. You must not specify the parameters Node-name, Node-parameters, Parameter-length, Post-flag and Work-address.

The parameter Work-address is only required when you add a nickname for an external address. When you add a nickname for an internal address, the system address is automatically provided (if you specify the parameter Work-address for an internal address, your address information will be ignored).

When you specify a user name in the parameter Object-name, you can either specify the last name or both last name and first name. Last name and first name must be separated by a comma (for example: Long,Sonya); you must not insert a blank character.

Parameters

Parameter Format In Out Remarks
Return-code N2 O X Input -1: no ET.
Cabinet A8 R   The cabinet in which the nickname is to be added.
Password A8 R   The password of the above cabinet.
Nickname A20 R   The nickname to be added.
ISN P8   X The ISN of the new nickname.
Address-type N2 R   Must be one of the following: 1=address (nickname), 4=bulletin board, 5=cabinet, 10=distribution list, 33=user ID, 70=last name, 74=external address.
Description A60/1:4 O   A brief description for the nickname.
Folder-name A15 O   The folder in which the nickname is to be stored. You must not specify a TRS folder or system folder (except Work). Default: Work.
File-name A15 O   The file within the above folder in which the nickname is to be stored.
Object-name A40 R   The name of the object for which you want to create the nickname (for example, the user ID). Only required for an internal nickname.
Node-name A8 R   The name of an existing node which has been added by the administrator. Depends upon the external node type. Only required for an external nickname.
Node-parameters A250 R   The physical address of the external node. Only required for an external nickname. See External Communication.
Parameter-length N3 R   The length of the Node-parameters.
Post-flag A1 O   Only required for an external nickname. Default: blank. Marking this flag is only useful, if you send mail using the online Con-nect. If marked, a window appears and you can enter additional information before the mail is sent. Therefore, do not mark this flag if you use Z-MAILA to send mail, since the window does not appear in this case.
Work-address A190/1:3 O   The work address is only required for an external address. You must redefine this parameter. For all required redefinitions, see the example program below.

Return Codes

00 Success
02 Invalid cabinet name or - in batch mode only - locked cabinet
03 Password incorrect
10 Function not valid for a system folder
21 Addressee not found
33 Addressee not unique
34 Address type not found
55 Requested folder/file does not exist
56 Requested folder is a TRS folder
73 Invalid folder/file name
91 Invalid name
92 Name already exists
93 External node does not exist
94 Object-number not allowed
95 Object with this name does not exist
96 Supply either the Object-name or Node-name, not both
97 No mailing function allowed
98 Address level is too low
99 The node is not a spool file node

Subprograms

Z-120
Z-122
Z-123
Z-135
Z-147
Z-150
Z-162
Z-174
Z-190
Z-200A
Z-1200&0

Example

0010 *
0020 * Add a nickname in a specific cabinet for an internal address
0030 *
0040 *
0050 * PARAMETER  : ADDR-TYPE  +   NODE-NAME    OR  NAME
0060 *            : _________     _____________    ________________________
0070 *            :   01                            NICKNAME
0080 *            :   04                            NAME OF BULLETIN BOARD
0090 *            :   05                            CABINET-NAME
0100 *            :   10                            NAME OF DISTRIBUTION
0110 *            :   33                            USER-ID
0120 *            :   70                            LASTNAME,FIRSTNAME
0130 *            :   74           NODE-NAME
0140 *
0150 ************************************************************************
0160 DEFINE DATA
0170 LOCAL
0180 1 RETURN-CODE            (N2)
0190 1 CABINET                (A8)
0200 1 PASSWORD               (A8)
0210 1 NICKNAME               (A20)        
0220 1 ISN                    (P8)
0230 1 ADDRESS-TYPE           (N2)               /* Allowed: 1,4,5,10,33,70,74
0240 1 DESCRIPTION            (A60/1:4)
0250 1 FOLDER-NAME            (A15)
0260 1 FILE-NAME              (A15)
0270 1 OBJECT-NAME            (A40)              /* - internal -
0280 1 NODE-NAME              (A8)               /* - external -
0290 1 NODE-PARAMETERS        (A250)             /* - external -
0300 1 PARAMETER-LENGTH       (N3)               /* - external -
0310 1 POST-FLAG              (A1)               /* - external -
0320 1 WORK-ADDRESS           (A190/1:3)         /* - external -
0330 *
0340 1 WORK-ADDRESS1          (A190)
0350 1 REDEFINE WORK-ADDRESS1
0360  2 WORK-TITLE            (A32)
0370  2 WORK-ORGANIZATION     (A32)
0380  2 WORK-LOCATION         (A32)
0390  2 WORK-DEPARTMENT-NAME  (A32)
0400  2 WORK-DEPARTMENT-NUM   (A10)
0410 1 WORK-ADDRESS2          (A190)
0420 1 REDEFINE WORK-ADDRESS2
0430   2 WORK-ADDRESS-LINES   (A60/1:3)        
0440 1 WORK-ADDRESS3          (A190)
0450 1 REDEFINE WORK-ADDRESS3
0460   2 WORK-CITY            (A32)
0470   2 WORK-STATE-PROV      (A8)
0480   2 WORK-POSTAL-CODE     (A10)
0490   2 WORK-COUNTRY         (A8)
0500   2 WORK-PHONE-COUNTRY   (A2)
0510   2 WORK-PHONE           (A15)
0520   2 WORK-PHONE-EXT       (A10)
0530 *
0540 END-DEFINE
0550 * *****************************
0560 RESET RETURN-CODE
0570 *
0580 MOVE 'WORK-ORGANIZATION'    TO WORK-ORGANIZATION
0590 MOVE 'WORK-LOCATION'        TO WORK-LOCATION
0600 MOVE 'WORK-DEPARTMENT-NAME' TO WORK-DEPARTMENT-NAME
0610 MOVE WORK-ADDRESS1    TO WORK-ADDRESS(1)
0620 MOVE WORK-ADDRESS2    TO WORK-ADDRESS(2)
0630 MOVE WORK-ADDRESS3    TO WORK-ADDRESS(3)
0640 MOVE 'CABINET'   TO CABINET
0650 MOVE 'PASSWORD'  TO PASSWORD
0660 MOVE 'NICKNAME'  TO NICKNAME
0670 MOVE  33         TO ADDRESS-TYPE  /* Allowed: 1,4,5,10,33,70,74
0680 MOVE 'USER-ID'   TO OBJECT-NAME   /* Distr.list;User-id;Cabinet;Bulletin;
0690 *                                    Lastname,Firstname,Nickname;
0700 CALLNAT 'Z-ADD01B' RETURN-CODE
0710                    CABINET
0720                    PASSWORD
0730                    NICKNAME
0740                    ISN
0750                    ADDRESS-TYPE
0760                    DESCRIPTION(*)
0770                    FOLDER-NAME
0780                    FILE-NAME
0790                    OBJECT-NAME
0800                    NODE-NAME
0810                    NODE-PARAMETERS
0820                    PARAMETER-LENGTH
0830                    POST-FLAG
0840                    WORK-ADDRESS(*)
0850 *
0860 IF RETURN-CODE = 0
0870    WRITE 'Address was added'
0880 ELSE
0890    WRITE 'Return Code:' RETURN-CODE
0900 END-IF
0910 *
0920 END