LISTFILES
LISTFILES lists all dictionaries, data sections and index sections defined from within the current account, or a specified account. LISTFILES can be run against an active list of filenames, in which case the output is filtered to include only the named files.
Alternatively, if a particular file is specified, LISTFILES lists the file's data and index sections.
Command class
Cataloged DataBasic program.
Syntax
LISTFILES {DICT} {/account/}{filename} {file-types} {(options}
Syntax elements
DICTShows the dictionary name of each file that is included in the output (the same effect as the D option).
/account/The name of an account for which each file and data section will be listed.
The initial slash character must be included unless the current master dictionary (MD) contains a Q-pointer to the required account. The trailing slash character can be omitted if there is no filename.
filename The name of a file for which data and index sections will be listed.
If neither account nor filename is specified, LISTFILES defaults to the current MD.
To list data sections for a file in another account, use /account/filename. (For MultiValue compatibility, the account,filename format is also supported.)
file-types One or more letters, each identifying a file type as defined in Ftype below. There must be no spaces between the letters. This filters the output to include only the specified file types.
If this parameter is included, the T option must also be included.
If you inadvertently include a data section name in the command line, LISTFILES ignores it.
Options
D Shows the dictionary name of each file that is included in the output (the same effect as the DICT keyword).
P Sends the listing to the printer.
T Specifies that the output is filtered to include only specified file types, typically by including a file-types parameter.
If the T option is included but there is no file-types parameter, you are prompted to specify one or more letters, each identifying a file type as defined in Ftype below. There must be no spaces between the letters.
V{limit}Sort the output by the descending total size of each file. An optional limit may be specified to restrict the output to files with a total size of over that value.
Report listing
Each dictionary name is listed with associated data sections listed below, indented by one space. Indexes are listed below associated data sections, indented by two spaces.
Depending on its contents, the report can begin with any of the following statements:
File definition items in account:
account
File definition items in file:
filename
File definition items of file:
filename
Filtered file items in account:
account
Filtered file items in file:
filename
Report headings
The following information is displayed:
File name The name of each file.
Type The type of D/CODE.
Ftype Type of file. This is defined by two characters; a letter and a number. The letter can be:
A A clean log binary data section.
B A byte stream file. (A 'normal' Reality file.)
C A clean log user view data section.
D A directory view.
E A special file created with the MAKE-SPECIAL command.
F A file on a foreign database.
G An SQL view.
H An automatically sized data section.
S An automatically sized data section for which automatic sizing has been suspended with AFS-HOLD.
The number can be:
1 Master dictionary.
2 File dictionary.
3 Data section.
4 Index section.
Mod Depends on the type of file:
Directory view The path to the host directory or folder.
Special file The special file type and any additional parameters.
Foreign database The data source name and user-id.
SQL view The data source name and user-id.
Automatically sized data sections
The default modulo (that is, the modulo assigned when data section was created or converted to automatic sizing).
Otherwise, shows the modulo of the file.
Details Depends on the type of file:
Directory view Blank.
Special file Blank.
Foreign database Blank.
SQL view The name of the SQL table.
Automatically sized data sections
The number of groups currently in the file.
Otherwise, shows the separation of the file (always 1).
Just Depends on the type of file:
Directory view and special file
Blank.
Otherwise, shows the type of alignment (L or R).
Len Depends on the type of file:
Directory view and special file
Blank.
Otherwise, shows the number of columns for output.
Examples
LISTFILES
Lists all the files in the current account, together with their data sections.
LISTFILES MYFILE
Lists the data sections for the file MYFILE.
LISTFILES /MYACC
Lists the files and data sections in the account MYACC.
LISTFILES bd (T
Lists only normal Reality files and directory views in the current account.
LISTFILES /MYACC hs (T
Lists all automatically sized data sections in the account MYACC.
Example of report
File definition items in account: TESTACC Page 1 File name Type Ftype Mod Details Just Len TAB2 D B2 1 1 L 10 TAB2 DY G3 dbora,bob TAB2 L 10 TEMP D B2 1 1 L 10 TEMP DY D3 /Temp LOCAL DL B2 1 1 L 10 DATA2 DL B3 11 1 L 10 LOCAL DL B3 11 1 L 10 X1 D B4 7 1 L 10 ORACLE DL F2 dbora,bob L 10 ORA2 DL F3 dbora,bob L 10 ORACLE DL F3 dbora,bob L 10 X1 D F4 dbora,bob L 10 T1 DL B2 1 1 L 10 T1 DL H3 7 134 L 10 IIDIS DIL B2 1 1 L 10 IIDIS DIL H3 7 134 L 10
In this report:
- LOCAL is a local file with two data sections and one index.
- ORACLE is a Foreign Database file with two data sections and one index (all stored on an Oracle database called 'dbora').
- TEMP is a Directory-View file of directory '/Temp'.
- TAB2 is a SQL-VIEW file of Table 'TAB2' on database 'dbora'.
- T1 is a file where the data section is automatically sized. The default modulo is 7 and the current number of groups is 134.
- IIDIS is a file containing case-insensitive item-ids.