Z-DIS17B

This document covers the following topics:


Description

Display a list of all members of a distribution list, a shared cabinet or a private cabinet which the user has shared.

This subprogram is similar to Z-DIS17A with the exception that the parameter Member-type has changed and the member ISN is also returned.

When you specify neither the parameter Start-name nor Start-ID, the members are returned alphabetically in ID sequence.

When you specify a start value in the parameter Start-name, only users are returned. In this case, the list is sorted alphabetically by last name.

When you specify a start value in the parameter Start-ID, all member types are returned. In this case, the list is sorted alphabetically by ID.

This subprogram checks first whether the distribution list exists in the specified cabinet. In the case of a private cabinet, this subprogram then checks whether members exist for the cabinet. If a distribution list is not found, this subprogram then checks whether a distribution list of that name exists in cabinet SYSCNT.

This subprogram should be invoked iteratively until the return code 77 indicates the end of the list.

Parameters

Parameter Format In Out Remarks
Return-code N2 O X Input -1: no ET.
Cabinet A8 R   The name of the cabinet in which you want to display the list.
Password A8 R   The password of the above cabinet.
Distribution-name A32 R   The name of a distribution list or the ID of a cabinet for which you want to display the members.
Start-name A20 O*   Start value. The user's last name. See the description above. Either Start-name or Start-ID, not both.
Start-ID A16 O*   Start value. See the description above. Either Start-ID or Start-name, not both.
List-type A1   X 1=distribution list, 2=cabinet.
Member-array (20)
  Name A20   X The name of the member.
  Mail-ID A16   X The ID of the member.
  Member-type N2   X The type of member:1=address (nickname), 4=bulletin board, 5=cabinet, 10=distribution list, 33=user ID (private cabinet), 70=last name, 74=external address.
  Mail-type A1   X The type of mail which the member of the distribution list receives: O=original, C=copy, B=blindcopy.
  Member-ISN P10   X The ISN of the member.
Work-parameter A40     For internal use. See The Work Parameter.

Return Codes

00 Success
02 Invalid cabinet name
03 Password incorrect
24 Security violation
30 Distribution list name invalid
31 No members found
53 Requested object does not exist
77 End of list
90 Specify either Start-ID or Start-name - you must not specify both

Subprograms

Z-120
Z-122
Z-123
Z-147
Z-165
Z-1200&0

Example

0010 *
0020 * Example program to return a list of all members of a distribution list,
0030 * shared cabinet or private cabinet
0040 *
0050 DEFINE DATA
0060 LOCAL
0070 1 RETURN-CODE       (N2)
0080 1 CABINET           (A8)
0090 1 PASSWORD          (A8)
0100 1 DISTRIBUTION-NAME (A32)
0110 1 START-NAME        (A20)  /* list only users - not other objects !
0120 1 START-ID          (A16)  /* list all objects by ID !
0130 1 LIST-TYPE         (A1)
0140 1 MEMBER-ARRAY (20)
0150   2 NAME            (A20)
0160   2 MAIL-ID         (A16)
0170   2 MEMBER-TYPE     (N2)   /* user,distribution,cabinet,bulletin,external
0180   2 MAIL-TYPE       (A1)   /* O=original, C=copy, B=blindcopy
0190   2 MEMBER-ISN      (P10)
0200 1 WORK-PARAMETER    (A40)
0210 *
0220 END-DEFINE
0230 *
0240 *
0250 MOVE 'CABINET'    TO CABINET
0260 MOVE 'PASSWORD'   TO PASSWORD
0270 MOVE 'DLIST NAME' TO DISTRIBUTION-NAME /* distribution list/shared cab.
0280 MOVE 'USER ID'    TO START-ID          /* to SORT by ID
0290 *
0300 CALLNAT 'Z-DIS17B' RETURN-CODE
0310                    CABINET
0320                    PASSWORD
0330                    DISTRIBUTION-NAME
0340                    START-NAME
0350                    START-ID
0360                    LIST-TYPE
0370                    MEMBER-ARRAY(*)
0380                    WORK-PARAMETER
0390 *
0400 IF RETURN-CODE EQ 0
0410   WRITE NAME(*) MAIL-ID(*) MEMBER-TYPE(*) MAIL-TYPE(*) MEMBER-ISN(*)
0420 ELSE
0430   WRITE 'Return code' RETURN-CODE
0440 END-IF
0450 END