Try to use the command RUNRMTCMD. Useful in many ways.
Hope this helps.
RUNRMTCMD over *IP will return a spooled file that can indicate response from the remote system.
However, three other methods can be far more useful.
Stored procedures are one common way of issuing remote program calls that can return values through parameter. Also, the EDRS APIs include a remote program call that can return parameters. And the Remote Command/Distributed Program Call host server can also be accessed between two systems — a PC is not required to talk to the server.
There are still other methods, but those are ones that can be most easily figured out.