I guess it depends partly on how much communication is going to take place between the 2 servers. Are you just going to send a few commands or instructions between them or are you going to send large volumes of information?
If it’s just commands or instructions, I’d opt for using the RUNRMTCMD command, if you’re going to use larger volumes of data, I’d start looking at shared folders or FTP in combination with a triggered program.
One of the best features of the iSeries is it’s ability to communicate with just about anything in just about every possible way – so you have a lot of choices available to you for this.
You don’t mention what type of application requirement you have, but assuming it’s “real time” then I would suggest TCP/IP sockets programming between the two systems. As a plug for my book, APIs at Work 2nd Edition, has an entire chapter on socket programming from RPG or COBOL passing data back and forth. The data in some cases is from a file, in other cases program data being dynamically retrieved, etc.
This does represent more work (writing the programs) than the RUNRMTCMD or FTP solutions Martin referenced, but also provides you with significantly greater application control over data flow and timeliness.