Command Parameters [ Understanding Your System ] MPE/iX 5.0 Documentation
Understanding Your System
Command Parameters
Simple commands, such as SHOWME and SHOWTIME, need--and want--nothing
more from you than this: type the name of the command and press Return.
SHOWMEReturn
SHOWTIMEReturn
The complex commands offer greater flexibility in their execution, but
this flexibility comes at a price. The complex command may require
additional pieces of information from you in order to execute
successfully.
The pieces of information that you add to a command are called
parameters. You add pieces of information after typing the command name
and before pressing Return. The PRINT command accepts a parameter, the
name of a file:
PRINT filenameReturn
Using italics here (filename) indicates that you would have to substitute
the name of an existing file where filename appears, as in this example:
PRINT TAXJANReturn
________________________________________________________________________
|Taken together, PRINT TAXJANReturn make up a command line--a line |
|consisting of a command, plus its parameters (if any), terminated |
|by Return. You might think of a command line as a package of |
|instructions for the computer. |
| |
| |
| * Use the PRINT command. |
| |
| * Use it on the TAXJAN file. |
| |
|Return ties up the package and sends it to the computer. |
________________________________________________________________________
A command gives instructions to the computer. In the same way,
parameters give instructions to a command. Parameters control or modify
the way in which the command executes.
Some commands accept only one parameter. Some accept many parameters.
Parameters fall into these two groups:
* Required parameters
A required parameter is a piece of information that you must add
to the command in order to have the command execute.
* Optional parameters
An optional parameter is a piece of information that you may
choose to add to the command. Add the information if it suits
your purpose.
Be aware, though, that choosing not to include an optional
parameter will cause the computer to do something. What will it
do? That depends upon which command you are using. The LISTFILE
command is an example.
Optional parameters
LISTFILE commands accepts several parameters, but all of them are
optional.
LISTFILEReturn
Used without any of its optional parameters, LISTFILE displays the names
of all of the files in the group where you are logged on. That is the
action that this command takes when you do not specify any of its
parameters.
Suppose, instead, that you want to see only the names of those files that
begin with the letter "G." If that is what you want, add one parameter to
the LISTFILE command line:
LISTFILE G@Return
Wildcard Characters: @ ? #
Character Meaning
--------------------------------------------------------------------------------------
@ This tells the computer to look for any combination of letters or
numbers (none or as many as 8). In this case G@ tells the
computer to look for any file name in your logon group that begins
with the letter G
? This is the equivalent of "any single character, letter or
number." G?? tells the computer to look for any file name
beginning with the letter "G" and having (at most) two more
letters or numbers in the name.
# This is the equivalent of "any single number (digit) 0 through 9."
________________________________________________________________________
|@#? translates to "any name beginning with any combination of letters|
|or numbers that ends in a single number followed by a single letter or|
|digit." |
| |
|Files called FIN2A, ACCT33, and TAXRPT2G would fit the specification |
|described by @#?. |
| |
|Files called FINAL2 or ACCTS3 would not fit the specification. |
________________________________________________________________________
Adding the parameter G@ permits you to narrow the search for file names
to the ones you wanted--file names beginning with "G."
Recall that LISTFILEReturn by itself gives you all of the file names in
your logon group. Why does it do that?
The programming engineers who created the LISTFILE command knew that
someone using LISTFILE would want to see the names of files, but which
files? They had no way of knowing what you might choose, so they made
two decisions.
The first decision was to leave the choice to you--the parameter for
specifying files is optional. You choose. The second decision concerned
what LISTFILE should display if you make no choice at all.
This second decision involved creating a default--a set of instructions
for LISTFILE to follow if the user does not specify any parameters. By
default, LISTFILE lists all the file names it can find in your current
group if you decide not to narrow the search. With this release,
LISTFILE contains additional parameters. For more information, refer to
the book, New Features of MPE/iX: Using the Hierarchical File System
(32650-90351).
Every optional parameter of a command has some default action. You will
find information about optional parameters and their defaults in book
Commands Reference - HP 300 Series 9X8LX (B3813-90011), and under the
Parameters heading, of each command in the MPE/iX Help Facility.
Required parameters
In contrast to optional parameters, required parameters are pieces of
information that you must give to a command in order to have the command
execute successfully.
The command to remove or erase a file, PURGE, requires that you supply at
least one parameter, the name of the file to be removed:
PURGE ACCTRPTReturn
This use of PURGE removes the file called ACCTRPT from the group in your
logon group. For PURGE, the name of some file is a required parameter.
If you accidentally omit the name of a file to be purged, the operating
system will display an error message informing you of your mistake. This
is true of any required parameter of any command. Omitting required
information from the command line generates an error message.
How do I find out which parameters go with each and every command? Two
sources of information are readily available:
* Commands Reference - HP 3000 Series 9X8LX (B3813-90011)
* the MPE/iX Help Facility
The MPE/iX Commands Reference Manual, Vols I and II (32650-90003),
a comprehensive manual that includes details on all MPE/iX
commands.
MPE/iX 5.0 Documentation