: MIDRANGE dot COM Mailing List Archive

RE: Communicating between java & rpg?


AddThis Feed Button


Pretty simple:

// Initialization - done once

        ProgramCall call = new ProgramCall(new AS400());
        ProgramParameter[] parms = new ProgramParameter[1];
        parms[0] = new ProgramParameter(2200);
        call.setProgram("/QSYS.LIB/APILIB.LIB/RECEIVE.PGM", parms);


// Call

public void receive(byte[] data)                // EBCDIC buffer
        throws Exception
{
        parms[0].setInputData(data);
        if (call.run() == false) {
                throw new Exception("Receive failed.");
        } else {
                data = parms[0].getOutputData();
        }
}

> -----Original Message-----
> From: java400-l-admin@midrange.com
> [mailto:java400-l-admin@midrange.com]On Behalf Of Tanveer, Mohammad
> Sent: Thursday, August 30, 2001 12:05 PM
> To: 'java400-l@midrange.com'
> Subject: RE: Communicating between java & rpg?
>
>
> what about the java side? can you give an example from that side.





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2007 by MIDRANGE dot 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 here. If you have questions about this, please contact

.

counter