You must manually start the IRC service. From the Control Panel, select “Services” from within “Administrative Tools,” right-click “System i Access for Windows Remote Command” and select “Start.” The IRC service can be changed to automatically start each time the PC is started. Locate the IP address of the remote computer. The IPCONFIG command can be used at the command prompt. On a command line from the System i platform, prompt the RUNRMTCMD using F4. Enter the following information:
Command: calc.exe
Remote location name: IP address of PC
Remote location type: *IP
Even though we’ve set up the IRC not to require a user ID and password, the PC still may require them. You should try it first without a user ID and password, and if that fails enter them. The user ID and password should match those for logging onto the PC.
Finally, run the RUNRMTCMD. If it fails, a spooled file is generated that you can use to determine the problem. If you see the calculator on the PC screen, it worked.
Setting Up Remote Commands
To set up AJS to run remote commands on a non-System i system, you’ll need to add the PC to the list of systems in AJS and create a scheduled job to run the remote command. To add the PC to the list of systems, follow these steps:
Open a single system under “My Connections” from your System i Navigator window.
Open Work Management folder.
Right-click “Advanced Job Scheduler” and select “Properties.”
On the Systems and Groups tab use the New button to add a new system.
From the dropdown, select “Windows” and click “OK.”
Enter a system name. This represents your PC.
Enter a brief description of the system.
Enter the PC’s IP address.
Enter a user ID and password if necessary. These should match the ones you used earlier when testing the RUNRMTCMD command on a command line.
Click “OK” (see Figure 1).
Click “Cancel” to close the AJS properties tabs.
To add a scheduled job:
Open a single system under “My Connections” from your System i Navigator window.
Open “Work Management.”
Expand “Advanced Job Scheduler.”
Right-click “Scheduled Jobs” and select “New Scheduled Job.”
Enter a job name and select Non-scheduled as the Type of job. We’re not going to schedule the job since this is just a test.
Below the Commands list box, check the Run as remote command box. This lets the scheduler know not to validity check the commands entered (see Figure 2).
Click “Add” to add a command to the list.
Enter “calc.exe” as the command and click “OK.”
Select the Batch Information tab.
Click the Browse button for System to run job and select the PC from the list. Click “OK” to add the system.
Click “OK” to add the job.
Click the Scheduled Jobs folder to list the jobs. Right-click the new job and select “Run. “
Click “OK” to run the job now. If the test is successful, a calculator will appear on the screen of the PC running the REXECD.
I hope this article has helped you with some of your AJS challenges. Look for many more new features in an upcoming article.