× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I'm not sure what I need to so to get this working.  I'm trying to call an
rpg program that takes 3 parms, the first 2 input the 3rd output.  All 3
fields are numeric, the only way I could get it to work without compile
errors was to pass all parms as strings.  I just convert them in the rpg.

When I call the rpg from a green screen passing the same parms it gives the
correct output but when I call from the java app it returns an error code
for the 3rd parm.

I'm guess what I'm looking for would be how to define the java and/or for
the following code?

Here is the java code:
        byte coNo = getKeyCoNo.byteValue();
        byte cycleNo = getKeyCycleNo().byteValue();

        ProgramParameter[] pList = new ProgramParameter[3];
        pList[0] = new ProgramParameter(coNo, 2);
        pList[1] = new ProgramParameter(cycleNo, 3);
        pList[2] = new ProgramParameter(7);

        ProgramCall pgm = new ProgramCall(system,
"/QSYS.LIB/PSSTGUI.LIB/CE1099.PGM", pLis);

.
.
.
            byte[] data = pList[2].getOutputData();
            AS400Text textConverter = new AS400Text(data.length,
getSystem());
            bAcctNo = new BigDecimal((String)
textConverter.toObject(data)).setScale(0);


Here is the RPG:
C           *ENTRY    PLIST
C                     PARM           ECO#    20
C                     PARM           ECYC    30
C                     PARM           EACC    7
C                     MOVE ECO#      CO#
C                     MOVE ECYC      CYCLE#  30


I need some help,

Robert Upshall
Professional Software of Amarillo
(806) 358-8928
rupshall@psasoft.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.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 on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.