Display Folder (DSPFLR)

The Display Folder (DSPFLR) command allows you to display or print a list of folders and documents, or to create an output file that contains the list of folders or documents.

Parameters

Keyword Description Choices Notes
FLR Folder Character value, *ALL Optional, Positional 1
TYPE Type of object *FLR, *DOC Optional, Positional 2
OUTPUT Output *, *PRINT, *OUTFILE Optional, Positional 3
LEVEL Level of list *ALL, *CURRENT Optional
OUTFILE File to receive output Qualified object name Optional
Qualifier 1: File to receive output Name
Qualifier 2: Library Name, *LIBL, *CURLIB
OUTMBR Output member options Element list Optional
Element 1: Member to receive output Name, *FIRST
Element 2: Replace or add records *REPLACE, *ADD
OUTFILFMT Outfile format *TYPE1, *TYPE2 Optional

Folder (FLR)

Specifies the names of folders or members on the list.

*ALL
All folders that the user has authority to see are listed.
folder-name
Specify the name of the folder whose contents is listed.

Type of object (TYPE)

Specifies whether folders or documents are listed.

*FLR
The list contains folders that the user has authority to see.
*DOC
The list contains documents that the user has authority to see.

Output (OUTPUT)

Specifies whether the output from the command is displayed at the requesting work station or printed with the job's spooled output.

*
The output is displayed.
*PRINT
The output is printed with the job's spooled output.
*OUTFILE
The output is directed to the database file specified for the File to receive output (OUTFILE) parameter.

Level of list (LEVEL)

Specifies whether the list includes folders nested within the folders listed or only the folders at the current level. This parameter is not allowed when (*) is specified on the Output prompt (OUTPUT parameter).

*ALL
The list includes folders nested within the folders at the specified level.
*CURRENT
Only folders at the specified level are listed.

File to receive output (OUTFILE)

Specifies the name and library of the database file that receives the output of the command. If the file does not exist, this command creates a database file in the specified library.

The possible library values are:

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the file. If no library is specified as the current library for the job, QGPL is used.
library-name
Specify the name of the library where the file is located.

Note: If you specify *FLR on the Type of object prompt (TYPE parameter) and a new file is created, system file QADSPFLR in system library QSYS with a format name of FLRDTL is used as a model.

If you specify *DOC on the Type of object prompt (TYPE parameter) and a new file is created, system file QADSPDOC in system library QSYS with a format name of DOCDTL is used as a model.

Output member options (OUTMBR)

Specifies the name of the database file member that receives the output of the command.

The possible member to receive output values are:

*FIRST
The first member in the file receives the output. If the file member does not exist, the system creates a member with the name of the file specified in the File to receive output prompt (OUTFILE parameter).
member-name
Specify the name of the file member that receives the output. If the file member does not exist, the system creates the member.

The possible replace or add records values are:

*REPLACE
The output data replaces any existing records in the specified member.
*ADD
The output data is added to the end of the existing records in the specified member.

Outfile format (OUTFILFMT)

Specifies the format of the database file to which the output of the display is directed.

*TYPE1
Output is directed to the file format used for Release V2R2 and all releases prior to V2R2. The format used is defined by model output file QADSPSDC (Document format) and QADSPSFR (Folder format) in library QSYS with record named DOCDTLS and FLRDTLS respectively.
*TYPE2
Output is directed to the file format used for Release V2R3 and all releases thereafter. The format used is defined by model output file QADSPDOC (Document Format) and QADSPFLR (Folder format) in library QSYS with record format named DOCDTL and FLRDTL respectively.

Examples

Example 1: Displaying or Printing Output

DSPFLR   FLR(GENERAL)  TYPE(*FLR)  OUTPUT(*)

This command shows a list of folders for the folder, GENERAL, at the requesting work station (if requested by an interactive job) or the output is printed with the job's spooled output (if requested by a batch job).

Example 2: Directing Output to a Database File

DSPFLR   FLR(*ALL)  TYPE(*FLR)  OUTPUT(*OUTFILE)  LEVEL(*ALL)
         OUTFILE(MYLIB/MYFILE) OUTMBR(MYMBR *REPLACE)

This command shows all the folders that the user has authority to view. The output is directed to MYMBR, in MYFILE located in MYLIB. If member MYMBR already exists, MYMBR is cleared and then the new records are added.

Error messages

None