Troubleshooting
Problem
This document provides an example of using the RUNRMTCMD CL command in a CL program to run a program on a networked PC. The instructions in the example use SEU to create the source code for the CL program.
Resolving The Problem
Prerequisite
Verify interactively from an i5/OS command line that the RUNRMTCMD can successfully connect to the IRC running on the PC and run a Windows command such as "CALC.EXE".
In this example, the RUNRMTCMD CL command is used in a CL program to run a program on a networked PC. The instructions in the example use SEU to create the source code for the CL program. The source code is created in a member named MYRMTCMD of the QCLSRC file in library QGPL. Once the QCLSRC member has been created, the CRTCLPGM command is used to compile the source code and create a CL Program called MYRMTCMD in library QGPL.
The commands to create the CL program are run on the IBM OS/400 or IBM i5/OS command line.
Type STRSEU, and press F4 to prompt the command. Fill in the prompt screen as shown below. The Text description is optional.
Press the Enter key. The following screen is shown:
Fill in the SEU input screen similar to the one shown below.
Press F4 to prompt the RUNRMTCMD. This will result in the following prompt screen. Fill it in similar to the one shown below.
The Command contains the path and name of the PC command, executable, or batch file that RUNRMTCMD will run. This example of RUNRMTCMD will run a PC batch file called transfer.bat that exists on the C:\ drive of the PC.
The Remote Location is the TCP/IP address of the PC where the PC command will run.
The Type is *IP.
The Remote user ID is the User ID on the PC where the PC command, executable, or batch program is to be run. It is not the IBM System i products user ID.
Page down to the following screen. Type the password for the PC user ID typed above. Microsoft Windows platforms typically use case sensitive passwords. The IBM i defaults to sending the password in all uppercase. Therefore, if the PC password is lowercase or mixed case, enclose it with single quotes ( ' ) as shown in the screen below.
Press the Enter key to return to the SEU entry screen. It will look similar to the following:
Type I5 (the letter I and the number 5) in place of the first two zeros on the line that starts with 0007.00 as shown below:
Press the Enter key, and the screen will display five additional input lines.
Fill in the input lines similar to the screen shown below.
Note: The lines that start with /* and end with */ are comment lines. The comments do not need to be included in the CL source that is being created. They should be replaced by actual steps that the CL program should take (if any). These steps might include steps like a creating a library (CRTLIB), creating a physical file (CRTPF), or might call other System i programs and so on.
Press the Enter key to get to the following screen:
Press F3 to get to the Exit Screen.
Press the Enter key to save the new CL program source.
The CL program source must be compiled before the CL program can be run. Take the following steps to compile the new CL program.
Type CRTCLPGM on the operating system command line, and press F4 to prompt.
Fill in the prompt screen as shown below:
Press the Enter key to create the new CL program.
The new CL program can be run from the command line or from the IBM i Scheduler. To run it from the command line, type the following command.
CALL PGM(QGPL/MYRMTCMD)
Press the Enter key.
Historical Number
331039712
Was this topic helpful?
Document Information
Modified date:
18 December 2019
UID
nas8N1016200