Sorry, the server limit for the number of parameters the Toolbox can pass to a program is 35. One technique others have used to get around the limit is to combine multiple values into a single parameter. I know of two popular techniques to combine values into a singe parm. In one case a format identifier is the first thing in the parm (or is passed in another parm). The target program reads the format to understand how data in the parm is laid out. This technique is often used in AS/400 APIs. Another technique is to define each value in a "length, type, data" group. These groups are placed in a single parm and parsed by the target. Suppose, for example, you combine a short, an integer, and two strings in a parameter. With technique 1 the parameter would look like 0100 01 0002 String1 String2 Where 0100 is the format, 01 is the short, 0002 is the int, and the two strings follow. This buffer is actually bad because it is not obvious where the first string ends and the second begins. You can do that with length indicators, or make the strings be constant length. If at a later date you decide to pass more info in the parm, you update the format to tell the target the change. To use the second technique the parm would be 0008 01 01 000A 02 0002 000D 03 String1 000D 03 String2 The first four bytes are the length of the group, the next two describe what is coming (01=short, 02=int, 03=string), and the data follows. The pattern is repeated for each value. I think the first technique works best when the data tends to be fixed length. Parsing at the target can be messy when there are a lot of variable length fields. Variable length fields are not a problem with the second technique because every value is parsed. Performance can be a problem with the second technique because every value must be parsed. You can also combine the two techniques. Put fixed length values at the front of the parm (preceeded by a format id) and follow them with length/type/data groups. Only the variable length things will be parsed. I hope this helps, David Wall AS/400 Toolbox for Java Madhavan <email@example.com>@midrange.com on 12/04/2000 08:19:59 PM Please respond to JAVA400-L@midrange.com Sent by: firstname.lastname@example.org To: email@example.com cc: Subject: Parameter limitation - Please help Hi All, I am calling a C program sitting on As400 (ILE C *PGM) from a Java class on the client and possibly see a scenario of more than 50 parameters. But the limitation on ProgramParameter seems to be 35 !! Is there any other way of issuing calls with more than 35 parameters ???? (I get a "com.ibm.as400.access.ExtendedIllegalArgumentException: parameterList: Length is not valid" error) Please help ! Thanks madhavan __________________________________________________ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/ +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: firstname.lastname@example.org +--- +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: email@example.com +---
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.