FLIST
Authorization
General User
Purpose
Use the FLIST command to display a full-screen list of information about selected files residing on accessed minidisks and accessed shared file system (SFS) directories. Aliases, external objects, and subdirectories are also listed for directories. Once in FLIST, you can do normal CMS file operations such as EDIT, COPY, and ERASE on the listed files by entering the command in the input area immediately to the right of each file ID on the screen. You can also issue FLIST subcommands to sort the displayed data, or to enter a new FLIST level that displays a full-screen listing of another set of files.
Operands
- fn
- is the file name, the alias, the external object, or the subdirectory to be listed. The default is an asterisk (*). Specify only the first eight characters of subdirectory names. See Pattern Matching for information on using * and + to specify a subset of files.
- ft
- is the file type of the file(s) to be listed. The default is an asterisk (*). Subdirectories will not be listed if a file type other than * is specified.
- fm
- is the file mode of the file(s) to be listed. The default is A.
Options
- Help fn
- specifies the file name of an exec to be called on invocation of the Help function (/H is a FLIST command). If this option is not specified, the default exec name used is HFLIST.
- Menu
- is used with the USE option to prevent formatting of the screen to the right of the input areas. When MENU is specified, the text from input file columns 8–27 is placed in screen columns 1–20. The text from file columns 29–68 (for short date) or 29–71 (for full or ISO date) is moved intact to the right of the input areas.
- Profile fn
- specifies the name of an alternate file to be used as the FLIST profile. The file type must be $PROFILE. Anything entered after fn is ignored. If fn $PROFILE does not exist, or if this option is not specified, the default profile used is FLIST $PROFILE *.
- Noclear
- specifies not to clear the screen on entry to FLIST. The default is to clear the screen before display of FLIST.
- Stack
- specifies the following line is to be stacked (and not executed) if the input area is used:
where:*FLIST nnnnn filename filetype filemode user_input
- *FLIST
- will make it a comment if CMS reads it.
- nnnnn
- is the file entry number in the list.
- filename
- is the displayed file name.
- filetype
- is the displayed file type.
- filemode
- is the displayed file mode.
- user_input
- is anything the user typed in the input area.
If the input area used is for a subdirectory, the format of the stacked line will be:
where:*FLIST nnnnn +fm.ni fm user_input
- nnnnn
- is the file entry number in the list.
- +fm.ni
- identifies the subdirectory named ni in the directory accessed as file mode fm.
- fm
- is the displayed subdirectory's access mode.
- user_input
- is anything the user typed in the input area.
For more information about the input area, see Using the Input Areas .
- One recnum
- causes the selected input line to be stacked (implies the STACK option) with any text entered in
the input area, then the FLIST session ends. The display starts at the record number specified. If
an incorrect value is found for recnum, the display starts with the first
record. Any extraneous input following recnum will be ignored. Following
are some occurrences when recnum is ignored, and the display starts with
the first record:
- No number specified
- Negative numbers or zero are specified as recnum
- Number specified as recnum exceeds the total number of records
- Any erroneous value or text specified as recnum
- PROTect
- specifies input fields can be used only once.
- SOrt fn
- specifies an alternate exec file name to be called when an FLIST /SORT subcommand (/Sx) is issued and the USE option is also given. The default file name is FLISTS. A sample FLISTS EXEC is not shipped with FLIST. However, one is shown as a sample under Using a Sort Exec.
- Use fn
- specifies a display of the named file (which must be in CMS EXEC format) rather than FLIST's
file listing. The file type must be EXEC and the file mode is assumed to be all (*). Parameters
entered after fn are ignored.
The data from file columns 8–27 is placed in screen columns 1–20. The remainder of the data columns are placed in the appropriate columns of the display, to the right of the user input areas. This means the LISTFILE DATE or LABEL options should be used when the input file is created. For more information on using the LISTFILE command, see LISTFILE.
Pattern Matching
*
and +
. - *
- represents any number of characters. As many asterisks as required can appear anywhere in a file
name or file type. For example, if you enter:
you will get a list of all your A-disk or directory files whose file name contains aflist *d* *exec*
d
and whose file type contains the character stringexec
. The list might include the following files:DAYBREAK EXEC A TUESDAY SAVEEXEC A FUND EXECUTE A GOODIES OEXEC2 A
You may also substitute an asterisk for file mode (
fn ft *
), to list all files with file name fn and file type ft on all your accessed minidisks and directories. In addition, you may use an asterisk, followed by a file mode number (fn ft *5
), to list the files with file name fn, file type ft, and file mode number 5 on all accessed minidisks and directories. You cannot use an asterisk in place of the file mode number (fn ft A*
is not valid). - +
- means any single character. As many pluses as required can appear anywhere in a file name or
file type. For example, if you enter:
you will get a list of all the files that have a three-letter file name and a file type offlist +++ stock
stock
on your A-disk or directory. The list might include the following files:OCT STOCK A FUN STOCK A SUN STOCK A
FLIST Subcommands
The following subcommands are available to help you once you enter FLIST. (In the syntax diagrams, uppercase letters indicate abbreviations. Only the uppercase letter(s) are needed; all subsequent characters are ignored.)
The /BOTTOM subcommand displays the last page of the current FLIST level.
The /CANCEL subcommand cancels all active FLIST levels without processing any other commands entered after the /CANCEL command.
The /DSPF subcommand displays the PF key settings for FLIST.
The /ENTER subcommand enters another FLIST level.
The options are the same as the FLIST options except Profile and Noclear will be ignored if specified. When creating the second level, the screen will be split into two equal parts. To change the location of the split, move the cursor to the place you want the screen to be split and press the SPL PF key (usually PF5).
To display a previous level, use the /En form of the subcommand, where n is a digit in the range 0–9 and corresponds to the level desired. The level identifier (LVL n ) is in the upper left corner of the display.
The /HELP subcommand displays information on the use of the FLIST command.
The /LEVEL subcommand enters another FLIST level.
The options are the same as the FLIST options except Profile and Noclear will be ignored if specified. When creating the second level, the screen will be split into two equal parts. To change the location of the split, move the cursor to the place you want the screen to be split and press the SPL PF key (usually PF5).
To display a previous level, use the /Ln form of the subcommand, where n is a digit in the range 0–9 and corresponds to the level desired. The level identifier (LVL n) is in the upper left corner of the display.
The /OMIT subcommand (as the first token) prevents appending the file ID to the input text and may be used to issue CP or CMS commands. However, specific /n, /t, or /m symbols are substituted.
The /QUIT subcommand leaves the current FLIST level after processing entered commands for the level.
- /sn
- specifies sorting by file name, file type, file mode.
- /st
- specifies sorting by file type, file name, file mode.
- /sm
- specifies sorting by file mode, file name, file type.
- /sl
- specifies sorting by record length, file name, file type, file mode. (Largest record length first.)
- /sb
- specifies sorting by number of blocks, file name, file type, file mode. (Largest number of blocks first.)
- /sd
- specifies sorting by date, time, file name, file type, file mode. (Most recent file first.)
The /SORT subcommand lets you sort the current FLIST level on the specified field(s). After sorting, the level is redisplayed from the top. If entries have been deleted, they are removed during the sort. (See also Using a Sort Exec.)
Sorting Subdirectories: Because the file type, record length, and blocks fields are blank for subdirectories, the /st, /sl, and /sb sorts cause subdirectories to appear first, followed by the sorted files. (Blanks come before any other character when sorting.)
Also, when sorting by file name, only the first eight characters of the subdirectory name are
significant. So if you had subdirectories named FAVORITEPIES
and
FAVORITECAKES
, FAVORITEPIES
could come before
FAVORITECAKES
.
The /TOP subcommand displays the first (top) page for the current level.
The /n subcommand positions the indicated line on the top line of the current level.
- /
- positions the associated entry on the level top line.
- /n
- positions the file n on the level top line.
The = subcommand repeats the last non-FLIST function for the current level. (FLIST functions, save for the /LEVEL, /ENTER, and /OMIT subcommands, cannot be repeated.) The repeat function does not cross level boundaries.
The ? subcommand displays the last non-FLIST function for the current level. This allows you to see what command would execute if the = subcommand were entered. To re-execute the displayed command, you must overtype at least one character of the command.
Program Access Keys
- PA1
- enters CP mode. To return to FLIST, enter:
b
Note: PA1 will not bring you to CP unless the terminal break key is set to PA1; PA1 is the default setting upon logon. If the terminal break key is not set to PA1, the PA1 key will enter CMS Subset mode just like the PA2 key. For more information about setting the terminal break key, see the CP TERMINAL BRKkey command in z/VM: CP Commands and Utilities Reference. - PA2
- enters CMS Subset mode. To return to FLIST, enter:
return
FLIST PF Key Settings
Several PF keys are already set for use with FLIST. The settings and associated FLIST functions follow. Keywords marked with an asterisk are valid only when issued from a PF key.
PF Key | Keyword | FLIST Action |
---|---|---|
1 | /H | Obtains information on the use of FLIST. |
2 | * BRW | Browses the file to the left of the cursor. |
3 | * END | Ends the level at cursor position. |
4 | XEDIT | Edits the file at the cursor position with the z/VM System Product Editor (XEDIT). |
5 | * SPL | Moves the split to the line indicated by the cursor. |
6 | /SB | Sorts by block size, file name, file type, and file mode. |
7 | * SCB | Scrolls backward (toward the top of the list). |
8 | * SCF | Scrolls forward (toward the bottom of the list). |
9 | /SD | Sorts by date, time, file name, file type, and file mode. |
10 | /ST | Sorts by file type, file name, and file mode. |
11 | * >I | Increases input area to end of line. |
12 | * CAN | Ends all levels and clears the stack if STACK option is in effect. |
Using the Input Areas
You may use the input areas after the file IDs to enter any command as if in the normal CMS environment, to execute CMS/CP functions, or to invoke an exec. You do not have to indicate the command is for CP or that it is an exec. However, to prevent any part of the file ID from being used in the command string, use the /OMIT (/O) subcommand as the first parameter.
Use a slash (/) if you want all or part of the file ID specified in the user input area. It may be used anywhere in the command sequence, as follows:
- /
- Insert the complete file ID.
- /n
- Insert the file name.
- /t
- Insert the file type.
- /m
- Insert the file mode.
- /f
- Insert the subdirectory name (
+fm.ni
).
Any combination of n, t, and m is valid up to a maximum of seven characters.
Note about Subdirectories |
---|
Only /m and /f can be used with subdirectories. They can be used in any combination up to a maximum of seven characters. /f is only valid when used next to a subdirectory. |
If not explicitly specified, FLIST will append the complete file ID to the user command
area. For example, if erase
alone is entered, FLIST will generate the command
string erase filename filetype filemode
and pass it to
CMS for execution.
After executing a command, the CMS console input stack is processed. Input starting with a slash will replace the original command and will be processed as if it had been entered by the user. Input not starting with a slash will be passed to CMS without any change in the contents of the line. If the stack is empty, the next input field is processed.
When all input fields are processed, the screen is redisplayed and the input area is changed to indicate what happened. If the first character of the input area is displayed as:
* | The command was valid and gave a zero return code. |
¬ | The specified command gave a nonzero return code. The return code is displayed following the ¬ symbol. |
+ | An unknown FLIST subcommand was issued. |
? | The command was unknown to CP/CMS. |
Invalid FLIST functions will remain displayed. If any error condition arises, FLIST will sound the terminal's audible alarm.
erase apple pie a0
exec recipe
copy vanilla icecream a1 vanilla icecream b1
copy sweet rolls a2 = = b (rep
ac +A.cookies o
assemble ingredie
msg Come and get it!
xedit empty file a1
erase drop test a1
erase external object a1
Using a FLIST Profile
FLIST looks for a profile (FLIST
$PROFILE *
by default) when it is first invoked. The profile may define PF key functions,
the title for level 0, and the text at the bottom of the screen. FLIST will use default values for
anything left undefined by the profile.
After processing the profile, FLIST checks the CMS console input stack and treats any stacked records the same way it treats profile records. This means you can use the stack to override the profile definitions.
FLIST only processes the profile once. It will ignore the PROFILE option if it is specified with the /ENTER or the /LEVEL subcommands.
- The profile is a file of fixed or variable record format with a logical record length (LRECL) of up to 132 characters.
- Use the following record format to define the title for level 0:
*HEADER header_textThe first 42 characters following *HEADER will replace the level 0 line. The text is centered in the top title (columns 8-49).
- Use the following record format to define PF key functions:
- n
- specifies the number of the PF key to be set.
- (btd)
- if specified, FLIST will display these three characters on the bottom line of the screen to show
this PF key's function. If not specified, FLIST will display the first three characters of the
function. However, if the bottom line of the screen is defined—either by the last line in the
profile or by the last stacked line—it will be displayed as defined, regardless of the *PFKEYS
records.
The (btd) format is important. It must be exactly three characters long and placed between parentheses.
- function
- specifies the FLIST keyword, CP or CMS command, or other command to be assigned to the PF key.
Only one PF key or command can be set per record.
Most functions are processed as if they were entered in the input area—except for the following FLIST keywords:
Function Meaning SPL Moves the split to the line indicated by the cursor. BRW Invokes the BROWSE function. HLP Invokes the HELP function (HFLIST EXEC). SCF Scrolls forward (toward the end of the file). SCB Scrolls backward (toward the top of the file). >I Increases user input area to end of line. CAN Cancels all levels. END Terminates the level containing the cursor. %% Clears the definition for the PF key. These keywords are only valid when issued from a PF key. They cannot be abbreviated and must be in uppercase.
- comments
- explain what the function is. Comments may easily be specified with FLIST keywords. However,
because other commands are processed as though they were entered in the input area, any comments
will be sent as input to the command and may cause errors. In most cases, putting the comments after
a closing parenthesis (
)
) will solve this problem. For example,*PFKEYS 6 (PRT) PRINT / (NOCC) Print an unformatted file.
- To define the bottom line of the FLIST screen, enter what you want displayed as the last record of the profile. The record cannot begin with an asterisk and cannot be more than 132 characters long.
Using a Sort Exec
If the SORT and USE options are specified when the FLIST command is issued, users should invoke their own sort routines while within the FLIST environment. The exec specified on the SORT option will be given control when the user issues a sort subcommand (/Sn) from the FLIST screen. FLIST will pass four parameters to the user's sort exec. They are:
- The file name
- The file type
- An asterisk (*) as the file mode of the file specified with the USE option of the FLIST command
- The second character of the sort subcommand issued from the FLIST screen (for example, the
n
in /Sn)
When the exec completes, FLIST redisplays the file specified on the USE option of the FLIST command.
The following steps show how you can try out the sample FLISTS EXEC.
- Be sure you are running in the CMS environment with a R/W minidisk or directory accessed as A.
- Create a CMS EXEC A file, which you will specify with the USE option of FLIST. (Be sure files
exist on the minidisk or directory accessed as A.) Issue the following CMS command:
listfile * * a (exec label
- Make sure the sample FLISTS EXEC exists on an accessed minidisk or directory.
Unless someone already created it, you will have to create the FLISTS EXEC.
- Make sure you do not have a HOLD FILE A file.
If the file exists, you should rename it before invoking the FLISTS EXEC, because the exec erases HOLD FILE A.
- Issue the following command to invoke FLIST:
flist (use cms sort flists m
- From the FLIST screen, issue the sort subcommand /sx. This causes FLISTS EXEC to get control and to sort CMS EXEC by file name. When the sort exec finishes, FLIST redisplays the sorted CMS EXEC.
- From the FLIST screen, issue the sort subcommand /sy. This causes FLISTS EXEC to get control and to sort CMS EXEC by file type. Again, when the sort exec finishes, FLIST redisplays the sorted CMS EXEC.
- When you are ready to quit, press PF3 (End) to leave FLIST. If you renamed HOLD FILE A in step 4, you may want to change its file ID back to HOLD FILE A.
Usage Notes
- Never reaccess a minidisk or directory displayed on one of the levels.
- Do not erase files displayed on any level with an exec or with an
erase * filetype filemode
sequence. - Do not erase a file displayed on more than one level.
The situations described above cannot be detected by FLIST and may result in randomly displayed file IDs or FLIST termination.
- Executing commands which alter files other than the subject file may result in randomly displayed file IDs upon return to FLIST. Processing of these commands is not affected.
- FLIST will not clear the user-supplied I/O interrupt table. Therefore, you can handle your own interrupts if you want to.
- FLIST loads itself as a nucleus extension.
- FLIST supports the following screen sizes: 24 x 80, 32 x 80, 43 x 80. Screen sizes other than these are forced to 24 x 80. For example, screen size 27 x 132 is forced to a 24 x 80 screen size.
- FLIST uses the date format your virtual machine is using and displays the date in that format.
- In addition to the FLIST command, you can also use the preferred FILELIST command to obtain similar results. See FILELIST for details.
Examples
- The following output is an example of using the FLIST command:
- Area
- Description
- 1
- FN – File name.
- 2
- FT – File type.
- 3
- FM – File mode.
- 4
- Area for entering subcommands.
- 5
- FF – File format. Designates how records are arranged in a file. F=Fixed and V=Variable.
- 6
- LRECL – Logical record length.
- 7
- Number of records in a file.
- 8
- Block size.
- 9
- Creation or last modified date.
- 10
- Creation or last modified time.
- In this example, a CMS EXEC was created using LISTFILE with the DATE option. Then, the FLIST
command was issued with the USE option.
Following is the sample output. Note the output appears in CMS LISTFILE format:l * exec (date e flist (use
- In the following example, a CMS EXEC was created using LISTFILE with the DATE option. The FLIST
command was issued using the MENU and USE options.
Following is the sample output, which also appears in CMS LISTFILE format:l * exec (date e flist (menu use
Messages and Return Codes
- DMS002E File not found [RC=28]
- DMS048E Invalid filemode fm [RC=24]
- DMS069E Filemode mode not accessed [RC=36]
- DMS104S Error rc reading file from disk or directory [RC=2xxx]
- DMS109S Insufficient free storage available [RC=2|4xxx]
- DMS514E Return code nn from command [RC=1xxx]
- DMS618E NUCEXT failed [RC=5xxx]
- DMS1153E File pool filepoolid is unavailable or unknown [RC=99]
- DMS2189E DMSRLD failed with return code rc. [RC=6xxx]
- DMS2190E Invalid console type or console disconnected. [RC=1]
Additional system messages may be issued by this command. The reasons for these messages and their location are:
Reason | Location |
---|---|
Errors in command syntax | Command Syntax Error Messages |