Z-DIS05X

This document covers the following topics:


Description

Display a list of cabinets sorted alphabetically by cabinet name.

This subprogram is the same as Z-DIS05 with the one exception that the parameter Cabinet-ISN uses the format P10.

You can either display a list of all cabinet types or of just a specific cabinet type (private, standalone, shared or public). You must specify the cabinet type in the parameter Start-cabinet-type.

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   Any user can invoke this subprogram.
Password A8 R   The password of the above cabinet.
Start-cabinet A8 O   Start value. The name of a cabinet. If Start-cabinet is not specified, a list of all cabinets of the specified cabinet type is returned.
Start-cabinet-type N1 R   0=private cabinet, 1=standalone cabinet, 2=shared cabinet, 3=public cabinet, 9=all cabinet types.
Number N2 O   The maximum number of cabinets 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.
Cabinet-table (20)
  Cabinet-name A8   X The name of the cabinet.
  Cabinet-type A1   X 0=private cabinet, 1=standalone cabinet, 2=shared cabinet, 3=public cabinet.
  User-last-name A32   X For cabinet type 0: the user's last name. For cabinet types 1, 2 and 3: the description of the cabinet.
  User-first-name A32   X Is only used with cabinet type 0: the user's first name.
  User-initial A1   X Is only used with cabinet type 0: the user's middle initial.
  Disallow-mail A1   X Is only used with cabinet types 1, 2 and 3. If marked, the cabinet is not able to receive or send mail.
  Owner A1   X If marked, an administrator has been specified as the owner of the cabinet.
  Administrator A1   X Only applies to an administrator cabinet: X=system administrator, A=cabinet administrator, S=supervisor.
  Cabinet-ISN P10   X The ISN of the cabinet.
Work-parameter A42     For internal use. See The Work Parameter.

Return Codes

00 Success
02 Invalid cabinet name
03 Password incorrect
77 End of list
91 Cabinet type not specified or specified incorrectly

Subprograms

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

Example

0010 *
0020 * Example program to display a list of cabinets with backup information.
0030 *
0040 DEFINE DATA
0050 LOCAL
0060 1 RETURN-CODE             (N2)
0070 1 CABINET                 (A8)
0080 1 PASSWORD                (A8)
0090 1 START-CABINET           (A8)
0100 1 START-CABINET-TYPE      (N1)
0110 1 NUMBER                  (N2)
0120 1 CABINET-TABLE (20)
0130   2 CABINET-NAME          (A8)
0140   2 CABINET-TYPE          (A1)
0150   2 USER-LAST-NAME        (A32)
0160   2 USER-FIRST-NAME       (A32)
0170   2 USER-INITIAL          (A1)
0180   2 DISALLOW-MAIL         (A1)
0190   2 OWNER                 (A1)
0200   2 ADMINISTRATOR         (A1)
0210   2 CABINET-ISN           (P10)
0220 1 WORK-PARAMETER          (A42)
0230 1 #INDEX                  (N2)
0240 *
0250 END-DEFINE
0260 *
0270 RESET RETURN-CODE
0280 MOVE 'CABINET'  TO CABINET
0290 MOVE 'PASSWORD' TO PASSWORD
0300 MOVE 'AAA-777 ' TO START-CABINET
0310 MOVE 9          TO START-CABINET-TYPE
0320 MOVE 20         TO NUMBER
0330 *
0340 REPEAT UNTIL RETURN-CODE NE 0
0350 *
0360   CALLNAT 'Z-DIS05X'
0370     RETURN-CODE
0380     CABINET
0390     PASSWORD
0400     START-CABINET
0410     START-CABINET-TYPE
0420     NUMBER
0430     CABINET-TABLE(*)
0440     WORK-PARAMETER
0450 *
0460   FOR #INDEX 1 TO NUMBER
0470     IF CABINET-ISN(#INDEX) NE 0
0480       WRITE  NOTITLE (SG=OFF ZP=OFF AD=L)
0490         '=' #INDEX
0500         / 'Cabinet name   ' CABINET-NAME(#INDEX)
0510         / 'Cabinet type   ' CABINET-TYPE(#INDEX)
0520         / 'User last name ' USER-LAST-NAME(#INDEX)
0530         / 'User first name' USER-FIRST-NAME(#INDEX)
0540         / 'User initial   ' USER-INITIAL(#INDEX)
0550         / 'Disallow mail  ' DISALLOW-MAIL(#INDEX)
0560         / 'Owner          ' OWNER(#INDEX)
0570         / 'Administrator  ' ADMINISTRATOR(#INDEX)
0580         / 'Cabinet ISN    ' CABINET-ISN(#INDEX)  /
0590       NEWPAGE
0600     END-IF
0610   END-FOR
0620 END-REPEAT
0630 *
0640 WRITE  'Return code ' RETURN-CODE
0650 *
0660 END