HPlogo Using NS 3000/iX Network Services: HP 3000 MPE/iX Computer Systems > Chapter 2 Virtual Terminal

REMOTE Command

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Allows commands to be executed in a remote environment.

Syntax

REMOTE           [:[envID][command ]
[envnum]

Use

Available          In Session?          Yes
                   In Job?              Yes
                   In Break?            Yes
                   Programmatically?    Yes
Breakable?                              No
Capabilities?                           None

Parameters

envID

The environment ID representing an established session on the remote node. This environment ID may be an actual node name. If both envID and envnum are omitted, the default environment is the one most recently referenced in a DSLINE or REMOTE command.

envnum

The number of the environment assigned when the environment was defined. This environment number is listed in the message returned after a DSLINE command.

command

A command that is to be executed in the remote environment; for example an MPE/iX command to be executed on a remote HP 3000.

Description

After you have established a remote environment (session) on a node, the REMOTE command allows you to issue commands in that remote environment. Because you can have several remote environments on a node at the same time, you use the REMOTE command along with a unique environment ID to specify one of several remote environments. If you issue REMOTE commands without specifying an envID or envnum, the default environment (the one most recently invoked) will be used.

NOTE: If an RPM-created process is already executing in a remote environment, you cannot issue a REMOTE command for that environment.

If a command parameter is included in the REMOTE command line, the remote operating system executes it and restores control to the local operating system. The local prompt reappears on your terminal screen. For example, at the MPE/iX prompt (which is shown for clarity), type the following command (user input is bold):

:REMOTE LISTF **default environment**
.
.**list of file names from
.**remote environment appears**
: **local prompt reappears**

If no command parameter is specified, a remote prompt is issued and the remote operating system retains control. You can then send commands to the remote system by entering them at this prompt without a preliminary REMOTE. The remote prompt reappears after the execution of each command until you enter a colon (:) at the remote prompt. This restores the local MPE/iX prompt, at which you can issue a subsequent REMOTE command or a local command. Suppose that the remote prompt is ENV1#. At the local MPE/iX prompt (which is shown for clarity), type the following commands (user input is bold):

:REMOTE**default environment already set to ENV1#**
ENV1#LISTF**executed in the remote environment**
.**list of file names from node ENV1 appears**
.
ENV1#:**typing a colon (:) restores the local prompt**
:REMOTE BYE

You can configure your own remote prompt (1 to 8 characters) by using the DSLINE ;PROMPT= option. If you wish to receive the remote system's local prompt (for instance, a colon [:]), specify DSLINE ;PROMPT= without a prompt string. Following is an example of a user-specified prompt (the local and remote prompts are shown for clarity, and user input is underlined):

:DSLINE SPOTS;PROMPT=VPRES>**default environment**
:REMOTE **now set to node SPOTS
MPE /iX-SPOTS:HELLO NSUSER.NSACCT

If you use the MPE/iX SETVAR HPPROMPT command to set a system prompt to anything other than a colon, then that prompt will override any prompt created by the DSLINE ;PROMPT= option. Details on use of the SETVAR command are in the MPE/iX Commands Reference Manual.

If you use SETVAR HPPROMPT, then leave the remote session and return to it, the remote system's prompt will be displayed until you press [Return]. In the following example, user input is underlined, and the local and remote MPE/iX prompts are shown for clarity:

:REMOTE REMENV HELLO USER.ACCT
:REMOTE
REMENV#SETVAR HPPROMPT "XYZ>>"
XYZ>>**new prompt replaces REMENV#**
XYZ>>:**colon (:) returns you to local session**
:REMOTE**to return to remote**
REMENV# [Return]**default prompt orients you**
XYZ>>>**returns to prompt set by SETVAR
HPPROMPT**
Feedback to webmaster