Z-ADD10

This document covers the following topics:


Description

Add a distribution list.

To add members to the distribution list, you must use Z-ADD17.

Parameters

Parameter Format In Out Remarks
Return-code N2 O X Input -1: no ET.
Cabinet A8 R   The cabinet in which the distribution list is to be added.
Password A8 R   The password of the above cabinet.
Distribution-name A12 R   The name of the distribution list to be added. When you add a distribution list in cabinet SYSCNT, the Distribution-name must not be the same as the name of an existing cabinet.
Description A60/1:4 O   A brief description for the distribution list.
Folder-name A15 O   The folder in which the distribution list 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 distribution list is to be stored.
ISN P8   X The ISN of the new distribution list.

Return Codes

00 Success
02 Invalid cabinet name
03 Password incorrect
10 Function not valid for a system folder
51 Invalid name
52 Object with specified name already exists
55 Requested folder/file does not exist
56 Requested folder is a TRS folder
90 Distribution list not added - ID already used for a cabinet
91 Error occurred - distribution list was not added

Subprograms

Z-120
Z-122
Z-123
Z-147
Z-150
Z-162
Z-190
Z-195
Z-1200&0

Example

0010 DEFINE DATA LOCAL
0020 1 RETURN-CODE         (N2)
0030 1 CABINET             (A8)
0040 1 PASSWORD            (A8)
0050 1 DISTRIBUTION-NAME   (A12)
0060 1 DESCRIPTION         (A60/1:4)
0070 1 FOLDER-NAME         (A15)
0080 1 FILE-NAME           (A15)
0090 1 ISN                 (P8)
0100 END-DEFINE
0110 *
0120 MOVE 'USER-ID'   TO CABINET
0130 MOVE 'PW'        TO PASSWORD
0140 MOVE 'DISTR-1'   TO DISTRIBUTION-NAME
0150 MOVE 'This is the first description line' TO DESCRIPTION(1)
0160 *
0170 CALLNAT 'Z-ADD10' RETURN-CODE CABINET PASSWORD
0180   DISTRIBUTION-NAME DESCRIPTION(*) FOLDER-NAME FILE-NAME ISN
0190 *
0200 IF RETURN-CODE EQ 0
0210    WRITE 'Distribution list was added'
0220 ELSE
0230    WRITE 'RETURN CODE' RETURN-CODE
0240 END-IF
0250 *
0260 END