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



Hi Jim,

depending on your budget and requirements there might be a really easy solutions you could try. I have implemented similar solutions using RPG and an application server that compiles RPG source code with extended functions into native i5/OS applications that runs as fast as 5250 applications; thus outperforming both Java and CGI applications. And it is really easy to learn and use if you already use ILE RPG (or Cobol).

AN EXAMPLE:

1) A customer needs to post some XML data (this example is basic XML
   but you could use SOAP messages or whatever you like) to your
   server.
2) Your server needs to do some calculation and send back an XML
   response to the customer.

Ad. 1)
The customer have a program (RPG, .Net, C/C++, Java or whatever) that post the following XML syntax to your server using fx. the following URL: http://your-domain-name/webservice/postdata

<?xml version="1.0" encoding="utf-8" ?>
<record>
        <companyname>ACME Corporation</companyname>
        <transactions>
                <transaction id="AK3495" />
                <transaction id="AK8448" />
                <transaction id="AK4826" />
        </transactions>
</record>

Ad. 2)
Your RPG application will do the following:
    a) Parse the XML
    b) Get the company name
    c) Get the number of transactions
    d) Process each transaction
    e) Do some calculation or whatever you like
    f) Send back some XML

And the program to do all of this (please note the ASP-like syntax of mixing standard ILE RPG and XML):

************************************************

<%@ language="SQLRPGLE" options="COMMIT(*NONE)" %>
<%
D*Name++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++++++Comments++++++++++++
D COMPANY       e ds                  prefix (c_)
D TRANSACTIONS  e ds                  prefix (t_)

D XPath           s           1024    varying

D CompanyName     s             10  0
D NumberTransactions...
D                 s             10  0
D i               s             10  0
D ID              s             10  0

/free

SetContentType('text/xml; charset=utf-8');

CompanyName = reqXmlGetValue(
                  '/record/companyname' :
                  'N/A');                    /* Ad. b */

NumberTransactions = num(
              reqXmlGetValue(
                  '/record/transactions/transaction[ubound]' :
                  '0')
              );                             /* Ad. c */

for i = 0 to NumberTransactions - 1;         /* Ad. d */

    XPath = '/record/transactions/transaction[' +
                  %trim(%char(i)) +
                  ']';

    ID = reqXmlGetValue(
              XPath :
              'N/A');

    /exec sql
        ... your SQL here ...                /* Ad. e */
    /end-exec

endfor;

/* Ad. f */
%><?xml version="1.0" encoding="utf-8" ?>
<status>
    <CompanyName>
        <%= CompanyName %>
    </CompanyName>
    <NumberOfTransactions>
        <%= %char(NumberTransactions) %>
    </NumberOfTransactions>
</status>
<%

*inlr = *on;
return;
%>

************************************************

If anyone needs more information about this specific application server I'll be happy to answer your questions or connect you with the company that created it. You might even get a trial version if you need to test it.

Best regards,
JohnF


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.