Z-MEMCAB

This document covers the following topics:


Description

Return a list of all cabinets and distribution lists in cabinet SYSCNT which have a specific cabinet as a member.

This subprogram can be invoked by a cabinet administrator, a system administrator, an administrator who has been defined as an owner of the Input-cabinet, or a user who has not been assigned administrative functions.

If user who has not been assigned administrative functions invokes this subprogram, all cabinets and distribution lists of which the user is a member are returned. In this case, the ID of the Input-cabinet must be the same as the user's own cabinet ID.

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   See the description above.
Password A8 R   The password of the above cabinet.
Input-cabinet A8 R   The ID of the cabinet that you are looking for.
Start-object A12 O   A cabinet ID or the name of a distribution list with which processing is to start.
Number N2 O   The maximum number of cabinets and distribution lists that are returned with each call. When you do not specify a value, or when you specify a value greater than 20, the default value 20 is used.
Output-table (20)
  Object-name A12   X The name of the cabinet or distribution list.
  Cabinet-type A1   X Applies only if the object is a cabinet: S=shared cabinet; P=private cabinet.
  Object-type N2   X 5=cabinet; 10=distribution list.
Work-parameter A12     For internal use. See The Work Parameter.

Return Codes

00 Success
02 Invalid cabinet name
03 Password incorrect
15 Invalid administrator status
77 End of list
90 Input-cabinet does not exist
91 No access; the Cabinet is not defined as an owner of the Input-cabinet

Subprograms

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

Example

0010 **********************************************************************
0020 * CALLING Z-MEMCAB
0030 **********************************************************************
0040 *
0050 DEFINE DATA
0060 LOCAL
0070 1 RETURN-CODE     (N2)
0080 1 CABINET         (A8)
0090 1 PASSWORD        (A8)
0100 1 INPUT-CABINET   (A8)
0110 1 START-OBJECT    (A12)
0120 1 NUMBER          (N2)
0130 1 OUTPUT-TABLE    (1:20)
0140   2 OBJECT-NAME   (A12)
0141   2 CABINET-TYPE  (A1)
0150   2 OBJECT-TYPE   (N2)
0160 1 WORK-PARAMETER  (A12)
0170 *
0180 1 #INX            (P3)      /* Counter
0190 END-DEFINE
0200 *
0210 INPUT 'CABINET:'CABINET /
0220   'PASSWORD:'PASSWORD /
0230   'INPUT-CABINET:'INPUT-CABINET /
0240   'START-OBJECT:'START-OBJECT /
0250   'NUMBER:'NUMBER
0260 *
0270 *
0280 REPEAT
0290 *
0300   CALLNAT 'Z-MEMCAB'
0310     RETURN-CODE
0320     CABINET
0330     PASSWORD
0340     INPUT-CABINET
0350     START-OBJECT
0360     NUMBER
0370     OUTPUT-TABLE(*)
0380     WORK-PARAMETER
0390 *
0400   WRITE NOTITLE 'RETURN CODE' RETURN-CODE
0410 *
0420   IF RETURN-CODE EQ 0 OR RETURN-CODE EQ 77
0430     FOR #INX 1 TO NUMBER
0440       WRITE NOTITLE
0441           OBJECT-NAME(#INX) 3X OBJECT-TYPE(#INX) 3X CABINET-TYPE(#INX)
0450     END-FOR
0460   END-IF
0470 *
0480   NEWPAGE
0490   UNTIL RETURN-CODE NE 0
0500 END-REPEAT
0510 END