开发者

Call RPG program from PHP

开发者 https://www.devze.com 2023-03-26 06:09 出处:网络
We have an AS/400 system. I am asked to look for a way to call RPG programs from PHP on our Apacher server. The only solution i found was installing zen开发者_C百科d server to AS/400 and using i5 PHP

We have an AS/400 system. I am asked to look for a way to call RPG programs from PHP on our Apacher server. The only solution i found was installing zen开发者_C百科d server to AS/400 and using i5 PHP API Toolkit. Since I don't know how to use AS/400 and don't have access i haven't tried it yet.

We can connect to database and read, write from php. I am asking if there is any way to call a rpg program on our system from php code and send parameters, retrieve output.

I found there is JTOpen for Java. Maybe same thing for Php would work.


You can execute host programs as if they were stored procedures.

For more information: iSeries Access ODBC: Stored Procedures


Today the easiest answer is the open-source PHP Toolkit for IBM i that is shipped with Zend Server and also is available for free download.


I'm not an iSeries developer so I can't give detailed instructions but it should be possible to use the CGIDEV2 library (http://en.wikipedia.org/wiki/Cgidev2) to expose RPG functionality over HTTP. This would make your RPG functionality easily accessible to PHP and any other environment which can act as a web client. The caveat is that you need to make source level modifications to the RPG in question which may not suit your working arrangements.

Edit: Sorry, I just noticed that you said you didn't have access to the iSeries directly so this won't be a solution for you,

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号