×
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.
As I understand your question, you have a java program accepting a data structure as an SQL stored procedure. If this is correct, and the format of the data passed is not modified before it reaches java, you can use knowledge of the data structure format, and jt400 classes to convert the data to a format that java understands, and then use pcml to call the rpg program.
I'm not at all sure this is the most efficient way to accomplish what you're trying to do, but the relevant jt400 classes incluce AS400DataType, AS400Text, AS400ZonedDecimal ...
That should be enough to get you started on google, but like I said, it seems to me like having java do a data type conversion, just to convert back to the original data type for a pcml call is the long way around. Unfortunately I can't offer a better suggestion.
Good luck, hope this helps
Josh
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of TAllen@xxxxxxxxxxxx
Sent: Tuesday, January 08, 2008 6:56 AM
To: midrange-l@xxxxxxxxxxxx
Subject: data structure input parameter for SPROC
I asked this question on the Java-L list but realized it is really an SQL
question.
I have an RPG program that needs to be wrapped with an external SQL stored
procedure. The RPG program takes a data structure as an input parameter.
The SPROC will be called from a Java application.
Are there any considerations for a data structure as an input parameter for
an SQL stored procedure? If the data structure is treated as one long
string then I have concerns on string termination characters and numeric
fields in the data structure. I assume that I would need to pad all the
strings and numeric fields.
I'd be interested to find out if anyone has done this before.
Thanks,
T
As an Amazon Associate we earn from qualifying purchases.
This thread ...
Re: data structure input parameter for SPROC, (continued)
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.