Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

@FSTAT - Output BS2000 catalog information

&pagelevel(3)&pagelevel

The @FSTAT statement can be used to output a list of files from the BS2000 catalog. It is possible to define the destination for the output. Optionally, it is also possible to output additional information about the files. The list is alphabetically sorted on the file names.

Operation

Operands

F mode, L mode

@FSTAT

[{ file | svarex }] [[ TO] line [(inc)]] [{  SHORT |  LONG  [ISO4 ] }]

file

Designates the files that are to be listed. The file operand must correspond
to the SDF data type <partial-filename 1..54 with-
wild(80)>.

Here, the symbolic name '/' for a file for which the LINK name EDTSAM or
EDTISAM has been assigned by means of the SET-FILE-LINK command is
not permitted.

If no file with the specified name is found, the message EDT5281 is output.

svarex

The list of files for output can also be specified by means of a string variable
(#S00..#S20).

line

Line number as of which information is to be written to the current work file.
Any existing lines are overwritten.

If a line with a number greater than the previous highest line number is
created then the current line number is modified.

If line is not specified then in the interactive mode's L mode, the result is
output to SYSOUT, in batch mode it is output to SYSLST and in F mode it is
written to work file 9. Work file 9 is deleted before being used. If a file is open
in work file 9 then the message EDT5189 is output and the statement is not
executed.

inc

Increment used to form the line numbers which follow line. If inc is not
specified then the increment implicitly specified by line is used (see
section “Implicit increment assignment”).
This specification does not change the work file's current increment.

SHORT

One file is output per line. Only file names, together with the associated
catalog ID and user ID, are output.

LONG

Further catalog information is output in addition to the file names.

Column

Header

Meaning

1-7

SIZE

Number of PAM pages

8

P

File on private or public data medium (*/'BLANK')

9-62

FILENAME

File name with CATID and USERID

63-69

LAST PP

Last used PAM page

71-78

CR-DATE

Creation date (format YY-MM-DD)

80

S

SHARE attribute (Y/N/S)

81

A

ACCESS attribute (W/R)

83-86

FCB

FCB type (SAM/ISAM/PAM/BTAM/NONE)

88

R

READ-PASS attribute (Y/N)

89

W

WRITE-PASS attribute (Y/N)

91-98

CODESET

Character set

The list is alphabetically sorted on the file names.

If the output is sent to SYSOUT or SYSLST then it is accompanied by a
header. If the output is sent to work file 9 (in F mode, without the line
operand) then the header is output in the information line (can be displayed
using @PAR INFORMATION=ON). If the output is written to a work file due
to the line operand then no header is output.

ISO4

The creation date is output in the form YYYY-MM-DD. The following fields
(see table) are moved accordingly.

If neither file nor svarex is specified then a list of all the files under the user's own ID is output.

If neither SHORT nor LONG is specified then only the file names are output (one per line). If the file specification in file or svarex contains a catalog ID, the file names are output with the catalog ID and user ID.

Otherwise, the file names are output in the same form as they are specified in the statement.
Partially qualified file names with a user ID form an exception here. In this case, @FSTAT outputs a list of file names without catalog IDs or user IDs for reasons of compatibility.

Output to SYSOUT or SYSLST is sent in the character set that has been defined for these system files. If the output is written to a work file then it is sent in the work file's character set. If the work file is empty and has the character set *NONE then the character set EDF041 is used. Characters that cannot be displayed in the target character set are always replaced by blanks.

Caution

In the case of large files, the fields for the reserved and used size for output in LONG mode may not be sufficient. In this case, nothing is output here. To ensure complete output in these cases, only the @SHOW command (format 1) should be used.