Sending Commands to an AS/400 Host without a Display Session

Using the Remote Command utility, you can start and control non-interactive programs on an AS/400 host without opening an AS/400 display session. Commands can be sent individually or in combination, and can be saved as an ASCII file for resubmission. Return codes are received, but program data cannot be returned from the host.

The Remote Command utility provides:

The API set and sample code is installed to the following location:

install_directory\Attachmate\EXTRA!\Samples\RCSAMPLE.*

To send commands to an AS/400 host without a display session
  1. Determine the non-interactive programs on the AS/400 host that you want to start and control from your personal computer.

    For example, to send an immediate message to one or more message queues, you would use the SNDMSG command.

  2. From the display session, test the command to make sure that it is a legitimate command.

  3. Write down or copy the command lines that you are entering from the display session.

  4. Open the Remote Command utility.

  5. From the File menu, choose Open.

  6. If you are creating a new command script (.RCS), choose New.

    -or-

    If you are editing an existing command script, select the filename of the command script that you want to edit, and then choose Open.

  7. Enter the command lines.
    To send
    Do this
    One command line Move the cursor to the command line to be sent, then choose the Send Command button.
    All commands listed in the box Choose the Send All Commands button.

    When commands are sent, the actual messages that were sent are displayed in the Command Output Messages box.

  8. Choose Save to save the command script (.RCS).

    You can also choose Save As to save an edited command script to be resubmitted, or Exit to close the Remote Command dialog box without saving your changes.

  Attachmate