Z-DIS05A

This document covers the following topics:


Description

Display a list of cabinets with backup information.

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

If the parameter Start-cabinet-type contains the value 4 or 9, backup information for cabinet SYSCNT is displayed.

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, 4=cabinet SYSCNT, 9=all cabinet types.
Selection-criterion N1 R   0=all cabinets backed up, 1=all cabinets marked for deletion, 2=all cabinets marked for deletion and backed up, 3=all cabinets marked for deletion and not backed up, 9=all cabinets.
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.
Days-between N4   X The number of days between backup and deletion. The value is taken from the system defaults.
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, 4=cabinet SYSCNT.
  User-last-name A32   X For cabinet type 0: the user's last name. For cabinet types 1 to 3: the description of the cabinet. Not valid for cabinet type 4.
  User-first-name A32   X Only used with cabinet type 0: the user's first name.
  Last-backup-date N8/1:2   X The dates of the last two backups. Format yyyymmdd.
  Last-backup-time N4/1:2   X The times of the last two backups. Format hhmm.
  Date-range-start N8/1:2   X Last two starting dates of the date range for backed up objects. Format yyyymmdd.
  Date-range-end N8/1:2   X Last two ending dates of the date range for backed up objects. Format yyyymmdd.
  Marked-for-deletion A1   X If marked, the cabinet is marked for deletion.
  Deletion-date N8   X The date when the cabinet is to be deleted. Format yyyymmdd.
  Deletion-time N4   X The time when the cabinet is to be deleted. Format hhmm.
  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 Start-cabinet-type not specified or specified incorrectly
92 Incorrect selection criterion (must be 0, 1, 2, 3 or 9)

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 SELECTION-CRITERION   (N1)
0120 1 NUMBER                (N2)
0130 1 DAYS-BETWEEN          (N4)
0140 1 CABINET-TABLE (20)
0150   2 CABINET-NAME        (A8)
0160   2 CABINET-TYPE        (A1)
0170   2 USER-LAST-NAME      (A32)
0180   2 USER-FIRST-NAME     (A32)
0190   2 LAST-BACKUP-DATE    (N8/2)
0200   2 LAST-BACKUP-TIME    (N4/2)
0210   2 DATE-RANGE-START    (N8/2)
0220   2 DATE-RANGE-END      (N8/2)
0230   2 MARKED-FOR-DELETION (A1)
0240   2 DELETION-DATE       (N8)
0250   2 DELETION-TIME       (N4)
0260   2 CABINET-ISN         (P10)
0270 1 WORK-PARAMETER        (A42)
0280 1 INDEX                 (N2)
0290 *
0300 END-DEFINE
0310 *
0320 RESET RETURN-CODE
0330 MOVE 'CABINET'   TO  CABINET
0340 MOVE 'PASSWORD'  TO  PASSWORD
0350 MOVE 'ZZT-555 '  TO  START-CABINET
0360 MOVE  9          TO  START-CABINET-TYPE
0370 MOVE  9          TO  SELECTION-CRITERION
0380 MOVE  20         TO  NUMBER
0390 *
0400 REPEAT UNTIL RETURN-CODE NE 0
0410 *
0420   CALLNAT 'Z-DIS05A'
0430     RETURN-CODE
0440     CABINET
0450     PASSWORD
0460     START-CABINET
0470     START-CABINET-TYPE
0480     SELECTION-CRITERION
0490     NUMBER
0500     DAYS-BETWEEN
0510     CABINET-TABLE(*)
0520     WORK-PARAMETER
0530 *
0540   FOR INDEX 1 TO NUMBER
0550     IF CABINET-ISN(INDEX) NE 0
0560       WRITE  NOTITLE (SG=OFF ZP=OFF AD=L )
0570         'Days between '  DAYS-BETWEEN (ZP=ON)
0580         /  'Cabinet name   '  CABINET-NAME(INDEX)
0590         /  'Cabinet type   '  CABINET-TYPE(INDEX)
0600         /  'User last name '  USER-LAST-NAME(INDEX)
0610         /  'User first name'  USER-FIRST-NAME(INDEX)
0620         /  'Cabinet ISN    '  CABINET-ISN(INDEX)
0630         /  'Backup date (1)'  LAST-BACKUP-DATE(INDEX,1)
0640         /  'Backup time (1)'  LAST-BACKUP-TIME(INDEX,1)
0650         /  'Backup date (2)'  LAST-BACKUP-DATE(INDEX,2)
0660         /  'Backup time (2)'  LAST-BACKUP-TIME(INDEX,2)
0670         /  'Date from   (1)'  DATE-RANGE-START(INDEX,1)
0680         /  'Date to     (1)'  DATE-RANGE-END(INDEX,1)
0690         /  'Date from   (2)'  DATE-RANGE-START(INDEX,2)
0700         /  'Date to     (2)'  DATE-RANGE-END(INDEX,2)
0710         /  'Deletion Date  '  DELETION-DATE(INDEX)
0720         /  'Deletion Time  '  DELETION-TIME(INDEX)
0730         /  'Marked for     '  MARKED-FOR-DELETION(INDEX)
0740         /  '  deletion     '
0750       NEWPAGE
0760     END-IF
0770   END-FOR
0780 END-REPEAT
0790 WRITE   'Return code ' RETURN-CODE
0800 END