Z-DIS13

This document covers the following topics:


Description

Display a list of folders.

This subprogram only lists folders of the first level, i.e. the name of a folder that is stored in another folder is not displayed.

This subprogram should be invoked iteratively until the return code 77 indicates the end of the list or until the number which was specified in the parameter Number is reached.

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 of folders.
Password A8 R   The password of the above cabinet.
Start-name A15 O   Start value. The name of a folder. When Start-name is not specified, a list of all folders is returned. When Start-name is specified, any input in the parameter Start-number is ignored.
Start-number N2 O   Start value. The internal number of a folder. When Start-number is not specified, a list of all folders is returned. If Start-number is, for example, 3 (Wastebasket), this subprogram returns the folders alphabetically, starting with the Wastebasket.
Number N2 O   The maximum number of folders 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.
Folder-table (20)
  Folder-name A15   X The name of the folder.
  Folder-number N5   X The internal number of the folder.
  Description A44   X The first line of the description.
  Number-of-files N5   X The number of files which are contained in the folder.
  Folders A1   X If marked, the folder contains other folders.
  Items A1   X If marked, the folder contains objects (files excluded).
  TRS A1   X If marked, the folder is a TRS folder.
  Folder-sequence N1   X 1 (ascending by date), 2 (descending by date), or 3 (user-defined).
Work-parameter A26     For internal use. See The Work Parameter.

Return Codes

00 Success
02 Invalid cabinet name
03 Password incorrect
77 End of list

Subprograms

Z-120
Z-122
Z-123
Z-147
Z-157
Z-175
Z-1200&0

Example

0010 DEFINE DATA LOCAL
0020 1 RETURN-CODE     (N2)
0030 1 CABINET         (A8)
0040 1 PASSWORD        (A8)
0050 1 START-NAME      (A15)
0060 1 START-NUMBER    (N2)
0070 1 NUMBER          (N2)
0080 1 FOLDER-TABLE    (20)
0090 2 FOLDER-NAME     (A15)
0100 2 FOLDER-NUMBER   (N5)
0110 2 DESCRIPTION     (A44)
0120 2 FILES           (N5)
0130 2 FOLDERS         (A1)
0140 2 ITEMS           (A1)
0150 2 TRS             (A1)
0160 2 FOLDER-SEQUENCE (N1)
0170 1 WORK-PARAMETER  (A26)
0180 END-DEFINE
0190 *
0200 INPUT CABINET / PASSWORD
0210 *
0220 REPEAT UNTIL RETURN-CODE EQ 77
0230 CALLNAT 'Z-DIS13' RETURN-CODE CABINET PASSWORD START-NAME START-NUMBER
0240                   NUMBER FOLDER-TABLE(*) WORK-PARAMETER
0250 IF  NOT RETURN-CODE = 0 OR = 77 
0260     WRITE 'Return code' RETURN-CODE
0270     STOP
0280 END-IF
0290 *
0300 DISPLAY FOLDER-NAME(*) DESCRIPTION(*)
0310 *
0320 END-REPEAT
0330 END