Remote Command Overview

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.

NOTE:Return codes are received but program data cannot be returned from the host.

Before Using Remote Command

Perform the following actions before using Remote Command.

  1. Determine the non-interactive programs on the AS/400 host that youd like to start and control from your PC. Following are some sample commands.

    To

    Use this command

    For Example

    Send an immediate message to one or more message queues

    SNDMSG

    SNDMSG MSG ('Testing Remote Command.') TOUSR(USERID)

    Add a library

    ADDLIBLE LIB

    ADDLIBLE LIB (MYLIB)

    Copy a file from one library to another library

    CPYF FROMFILE TOFILE

    CPYF FROMFILE (QGPL/TEMP1) TOFILE(MYLIB/TEMP2

    Submit a job to a queue to be run later as a batch file

    SBMJOB CMD

    SBMJOB CMD (CRTCLPGM PGM (NEWPGM) TEXT('New program')

  2. From the display session, try the command you want to send to make sure it is a legitimate command.

  3. Copy the command lines that you are entering from the display session. This is easier than remembering a long command line.