Entering Commands

When you are running your virtual machine under z/VM®, each command, or request for work, that you enter on your terminal is processed as it is entered. Usually, you enter one command at a time and commands are processed in the order that you enter them. You can enter CP commands from either the CP or CMS environment, but you cannot enter CMS commands while in the CP environment.

After you have typed in the line you wish to enter, you press the Return or Enter key on the keyboard. When you press this key, the line you have entered is passed to the command environment you want to have process it. If you press this key without entering any data, you have entered a null line. Null lines sometimes have special meanings in z/VM.

If you make a mistake entering a command, z/VM tells you what your mistake was, and you must enter the line again. The examples in this publication assume that the commands are correctly entered.

You can enter commands using any combination of uppercase and lowercase characters; z/VM translates your input to uppercase.

To enter a command from a display terminal when you use it as a virtual machine console under z/VM, type the command and press Enter. The keyboard is never locked during the execution of a command or program, so you can enter successive commands without waiting for the completion of the previous command. This stacking function can be combined with the other methods of stacking lines, such as using the logical line end symbol (#) to stack several commands. To stack commands with the logical line end symbol, type the commands on the command line, separate them with #'s, but do not press Enter until you have typed all the commands you want done at one time. For example, you might enter the following commands:
cp query time # cp query reader all # receive

First the system will display the time, then the contents of your virtual reader, and then will read in the first file in your virtual reader.

If, however, you enter more lines than your terminal can accommodate, you receive the status message NOT ACCEPTED, and you must wait until the buffer is cleared before you can enter the line.

If there are commands that you use frequently, you can set the program function keys (PF keys) on your terminal to process them. Although there is one set of function keys (1 through 24) on your terminal, these keys can have different settings in various environments.

For example, when you first LOGON, you might set your PF keys to perform certain functions. Then, when you enter different CMS environments, your PF keys may have entirely different settings. Introducing Full-Screen CMS provides details on PF keys in full-screen CMS and in the Window Manipulation (WM) environment. The remainder of this section will concentrate on setting PF keys for use when full-screen CMS is set off.

Some examples of commands you might wish to catalog on your CP and CMS PF keys are:
#CP QUERY READER ALL
#CP QUERY PRINTER ALL
QUERY ACCESSED
To set function keys 1, 2, and 3 to perform these command functions, enter:
cp set pf1 immed "#cp query reader all
cp set pf2 immed "#cp query printer all
cp set pf3 immed query accessed
Note: When you want to process a #CP function with a PF key, or you want a PF key to run a series of commands, you must use the logical escape symbol (") when you enter the SET command.
You can change a PF key setting any time during a terminal session, according to your needs. For example, you can change the setting of the PF5 key by entering:
cp set pf5 immed xedit test file"#bo"#input line"#file
sets the PF5 key as:
XEDIT TEST FILE#BO#INPUT LINE#FILE
Then, when you press PF5, z/VM will XEDIT a file called TEST FILE, input the word line, and write the file to file mode A.

Note: Throughout this document, you may see references to the term file mode A. This term refers to a minidisk or SFS directory that is accessed with a file mode of A. You may also see references to A-disk, which is another term sometimes used to refer to the directory or minidisk accessed with a file mode of A.
You can also set all of your PF keys in your PROFILE EXEC so they are set each time you load CMS. To change the setting of the PF5 key in your PROFILE EXEC, you could add to your PROFILE EXEC the line:
CP SET PF5 IMMED XEDIT TEST FILE #BO# INPUT LINE #FILE
Then, the next time you load CMS, the PF5 key will be set to perform this function. In this instance, you would not need to include the logical escape characters (") because the command was entered from a file.
The above examples use the IMMED operand of the CP SET command, which specifies that the function is performed as soon as you press the PF key. You can also set a key so that it is delayed, which results in the command or data line being placed in the user input area. Then, you must press Enter to process the command. For example:
cp set pf1 "#cp query rdr all
would place the following command in the user input area when PF1 was entered:
#cp query rdr all
The user would then press Enter for the command to be processed. The default setting is DELAY for PF keys.
With delay, it is possible to modify the line before you enter it. For example, you might set a key as:
QUERY ACCESSED X@
When you press this PF key, the command is placed in the user input area, with the cursor positioned following the @ logical character delete symbol; you can enter the mode letter of the directory or minidisk you are querying before you press Enter to process the command. If you enter A, the X is deleted, and the resulting command as seen by CMS is QUERY ACCESSED A. For more information on using the logical character delete symbol, see the section on Logical Line Editing Symbols in z/VM: CP Commands and Utilities Reference.