View Full Version : Calling RPG programs from HTML?
01-01-1995, 02:00 AM
I have a web site that cuurently resides on the as/400 that uses Net.Data macros with SQL functions to access DB2 data on the 400. Is it possible to pass parameters and run RPG programs in this scenario? I was told that SQL works well for small file access, but RPG access is still the best way to get at DB2 data. I know that REXX is a supported Net.Data language environment, but I know little more about it. Can anyone enlighten me? I can think of a good example for doing this... Let's say you have a complex method of pricing products for clients. You already have an RPG program written to do this task. Instead of re-writing the pricing program in, let's say Java, can you pass client and product info to the RPG program and return the price, as a Net.Data variable, and then send this back through a browser?
04-24-2000, 09:31 AM
Give an example of a "Complex method"; it cannot be difficult in REXX. bobh
04-24-2000, 10:19 AM
Bob, it may not be too difficult to re-write apps in REXX, I may experiment with it in the near future. what i am curious about now is whether i can run RPG pgms from my net.data/sql driven web site. i attended a seminar about one of those as/400 application development software companies that we are all hearing about (seagull, jacada, lansa, etc...) and they said that using sql to access db2 will yield bad performance when applied to large files. i dunno, i thought that if a 'native' (rpg) approach were taken, this caution would go away. can you access db2 using rexx? maybe this is an area i need to explore. .........thanks
04-24-2000, 04:56 PM
05-16-2000, 01:01 PM
Net.Data provides a function to call an RPG program from within the macro; the function is DTW_DIRECTCALL For more info on the function, see http://www.as400.ibm.com/products/netdata/news/newfun6.htm
05-17-2000, 06:01 AM
You should be able to call the PGM using SQL like in other environments. (theory on my part) I do it in VB. You could store the result and retrieve it with a subsequent SQL stmt. Just a thought.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.