× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Scott understands, but he also has the gift of clarity with his explanations. If you have a chance to hear him speak at your local user group. make sure you go. Its worth it. I heard him speak in Dallas this winter and he is superb at presenting his topic in a way that everyone understands.

John Candidi wrote:
Wow, I don't know about anybody else, but to this uninformed person, that
was a great "lesson". Thanks Scott

-----Original Message-----
From: midrange-l-bounces+jacandidi=rutgersinsurance.com@xxxxxxxxxxxx
[mailto:midrange-l-bounces+jacandidi=rutgersinsurance.com@xxxxxxxxxxxx] On
Behalf Of Scott Klement
Sent: Wednesday, June 06, 2007 6:54 PM
To: Midrange Systems Technical Discussion
Subject: Re: How would one run a System i command from a Windows Run line?

Booth Martin wrote:
I do not understand, Scott. I do not even understand where to start looking. Any hints would be appreciated.

First, you need a program on the System i that will sit and wait for commands, and runs them. A "server program". This is similar in concept to the FTP, TELNET, HTTP, SMTP, etc servers, but this is one designed to run remote commands. It's called the "remote execution" server, or "rexec" for short.

To start this server on your System i, type the following:

STRTCPSVR SERVER(*REXEC)

Once started, it'll remain running until you end it with the ENDTCPSVR command, or until the QSYSWRK (IIRC) subsystem is stopped, or the systemis powered down, etc... you get the idea. You can also have it start automatically when TCP/IP is started by typing this:

CHGRXCA AUTOSTART(*YES)

You can do the same things as STRTCPSVR, ENDTCPSVR and CHGRXCA via iSeries Navigator (under Network/Servers/TCPIP ) if you prefer that to the green screen commands.

Once that server has been started, you can run commands from another system. From another iSeries system, you'd use the RUNRMTCMD command to run the command. From a Windows system, you'd use the rexec command.

For example, to run the SNDMSG command to send myself I note, I might type this from Windows XP's Start -> Run box:

rexec as400.example.com sndmsg msg(hello) tousr(klemscot)

This causes it to submit the command "sndmsg msg(hello) tousr(klemscot)" to the system named "as400.example.com".

You can control the userid that rexec logs onto the system with by passing the -l switch to rexec. For example:

rexec -l boothm as400.example.com dltf qgpl/test

More info about the iSeries REXEC server can be found in the Information Center under Networking / TCP/IP Applications Protocols and Services / REXEC.

More info about the Win XP Pro rexec command can be found here:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-
us/rexec.mspx

Search the Web for REXEC you'll find lots more information (probably too much!)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.