8/09/09 Using RUNRMTCMD to tell other systems to perform tasks and run scripts

You can have Linux, UNIX and Windows servers do tasks and runs scripts right from an i5/OS command line or a CL program. If you use CL, your program will even wait until the other sever completes its task before moving to the next instruction.

Use the RUNRMTCMD command and enter the foreign system command in the COMMAND parameter, the IP address or host name in the REMOTE LOCATION parameter, and indicate *IP for Type. Of course, you’ll also need a user name and password for the remote server.

The RUNRMTCMD will end and the next CL statement will execute when the command completes on the target system. If you want things to happen "asynchronously," use the COMMAND parameter to run a script on the foreign system that submits another job or spawns off another process. Just remember, whatever process you invoke on the target system has to finish before control returns to your CL. If the target system gets stuck, so does your program.

Using this command can also be a handy way to automatically perform functions when switching servers using the your high availability automation; you can trigger scripts that automatically change DNS, clear DNS cache, alter software configurations, and more.


Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2009, Vision Solutions, Inc. All rights reserved. Vision Solutions develops and sells iSeries high availability and AIX replication and clustering solutions. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.

No comments: