Using Commands

You can use CP commands whenever:
  • Your virtual machine is in the control program (CP) command environment. Your virtual machine is in the CP environment when you log on to z/VM® and CP READ is displayed in the lower right-hand corner of the screen. On a line-mode ASCII device, there is no status area to display CP READ, so CP is displayed in the output area.
  • You press the break key while in full-screen mode before entering a command. (The break key may be PA1, the VM default break key, or another key that you have defined as the break key using the TERMINAL BRKKEY command. Also, the break key may be totally disabled by some application programs or when in the protected application environment.)
  • You are in a virtual machine command environment, not running in full-screen mode, and enter the #CP command (and # is your logical linend character).
  • You are in the CMS virtual machine environment and enter the CP command.
  • You are in the CMS virtual machine environment and have the IMPCP function set ON.

To determine the current command environment on a 3270 device, look at the status area in the lower right-hand corner of the display screen. CP READ indicates the CP environment, and VM READ indicates the virtual machine environment. If you are running CMS in your virtual machine, VM READ indicates the CMS environment. When RUNNING appears in the status area, enter a null input line to determine your environment. (To enter a null line, press the ENTER key but do not enter any data.) When you enter the null line, the status area displays either CP READ or VM READ. Also, if you are in a read state, in either the CP command environment (with RUN set OFF) or the CMS command environment, and you enter a null line, the system responds with the name of your command environment: CP or CMS in the system output area.

To determine the command environment for a line-mode device, a null entry (carriage return with no data) yields CP or CMS in the system output area.

You enter CP commands using any combination of uppercase and lowercase letters. When you have typed the command and its operands, press the ENTER key to process the command.

You may enter commands from CMS EXEC procedures or applications. See z/VM: System Operation and z/VM: REXX/VM User's Guide, and the description of DIAGNOSE X'08' in z/VM: CP Programming Services, for information on the programming interfaces for simulating the virtual console.

When simulating a virtual console, keep the following considerations in mind:
  • Textual output from commands may change from release to release. In particular, command output that affects the way you use a terminal may be rearranged. NLS support may make the output available in multiple languages. Textual output is changed only when necessary.
  • Return codes remain relatively stable from release to release.