Wednesday, May 5, 2004 04:58 PM
There was a RUNPCCMD command that could be run from a CA/400 5250 session to run a DOS command on the local PC but I believe this is no longer supported with CA Express.
One solution to your problem is to have a Java application running on the PC that checks a data queue (com.ibm.as400.access.DataQueue.read()) on the AS/400 at a regular interval (using java.util.Timer and java.util.TimerTask). Alternatively you could have the read in a loop using read(-1) but you will need some way of shutting it down. When the RPG program has something ready to print it places an entry on the data queue which contains the necessary information for the Java program to process the required data.
Another, more complex solution, would be to have an RMI server application running on the PC which handles the print processing. The Java method your RPG program calls would be part of an RMI client which then runs the required methods(s) on the PC.