× 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.



   It's not pretty but it is *highly* edited.

<code>
//  declared at beginning of code

    int myOutReqLen  = 0;
    ProgramParameter[] myParmList = new
ProgramParameter[34];
    String  myOutRequestString    = "";

//  Just prior to ProgramCall

    Object[]  myReturnedObjects = {
      new Short("0"),
      new byte[32575]
    }; // end myReturnedObjects

    AS400DataType[] outRequestDataType = {
      new AS400Bin2(),
      new AS400ByteArray(32575)
    }; // end AS400DataType[]

    AS400Structure outRequestStructure = new
AS400Structure(outRequestDataType);

    // Create a byte array from the AS400Structure
    byte[] myByteArray =
outRequestStructure.toBytes(myReturnedObjects);

    // Create a ProgramParameter using the value of
the byte array
    myParmList[34] = new ProgramParameter(
myByteArray, 32577);


//   Just after ProgramCall

        Object[] myReturnedObjectArray =
(Object[])outRequestStructure.toObject(myParmList[34].getOutputData());
        myOutReqLen =
((Short)myReturnedObjectArray[0]).intValue();
        byte[] myOutRequestByteArray = new
byte[myOutReqLen];
        myOutRequestByteArray =
(byte[])myReturnedObjectArray[1];
        AS400Text myAS400TextOutRequestString = new
AS400Text( myOutReqLen, myAS400 );
        myOutRequestString =
(String)myAS400TextOutRequestString.toObject(
myOutRequestByteArray );

</code>

Hope that helps,
Don Whittaker

--- Robert Upshall <rupshall@psasoft.com> wrote:
> Thanks, that would work for me too, I was wondering
> if there was a way to
> pass data structures via java.
>
> Would it be possible to get an example of how to set
> and get the
> AS400Structure before and after a program call?
>
> Thanks,
> Robert
>
> ----- Original Message -----
> From: "Donald Whittaker"
> <donald_whittaker@yahoo.com>
> To: <java400-l@midrange.com>
> Sent: Tuesday, November 12, 2002 9:20 AM
> Subject: Re: Limit on ProgramParameters?
>
>
> >    I ran into the same problem.  (And don't even
> get
> > me started on why I had so many parms...)
> >    I converted a big chunk of the parms to an
> > AS400Structure, which solved the number of parms
> > issue.
> >
> > Thanks,
> > Don Whittaker
> >
> > --- Robert Upshall <rupshall@psasoft.com> wrote:
> > > Can anybody tell me why the number of parms on a
> > > ProgramCall object is
> > > limited to 35?
> > >
> > > Robert Upshall
> > > Professional Software of Amarillo
> > > (806) 358-8928
> > > rupshall@psasoft.com
> > >
> > >
> > > _______________________________________________
> > > This is the Java Programming on and around the
> > > iSeries / AS400 (JAVA400-L) mailing list
> > > To post a message email: JAVA400-L@midrange.com
> > > To subscribe, unsubscribe, or change list
> options,
> > > visit:
> > >
> http://lists.midrange.com/cgi-bin/listinfo/java400-l
> > > or email: JAVA400-L-request@midrange.com
> > > Before posting, please take a moment to review
> the
> > > archives
> > > at http://archive.midrange.com/java400-l.
> > >
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > New DSL Internet Access from SBC & Yahoo!
> > http://sbc.yahoo.com
> > _______________________________________________
> > This is the Java Programming on and around the
> iSeries / AS400 (JAVA400-L)
> mailing list
> > To post a message email: JAVA400-L@midrange.com
> > To subscribe, unsubscribe, or change list options,
> > visit:
> http://lists.midrange.com/cgi-bin/listinfo/java400-l
> > or email: JAVA400-L-request@midrange.com
> > Before posting, please take a moment to review the
> archives
> > at http://archive.midrange.com/java400-l.
> >
> >
>
>
> _______________________________________________
> This is the Java Programming on and around the
> iSeries / AS400 (JAVA400-L) mailing list
> To post a message email: JAVA400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit:
> http://lists.midrange.com/cgi-bin/listinfo/java400-l
> or email: JAVA400-L-request@midrange.com
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/java400-l.
>


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.