472,123 Members | 1,346 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,123 software developers and data experts.

PHP calling programs on AS/400

I have a website (running on a linux machine) that currently makes use
of JSP to access data on an AS/400.

I've found information telling me that after setting up ODBC drivers on
the linux server I'll be able to access the databases on the AS/400
however I've not found any information about executing programs on the
AS/400.

I've looked at the docs for exec, passthru, etc. and it appears those
will only work on the local operating system.

Is it possible for a PHP page to execute a program on a remote machine?

If so, how does PHP handle the ASCII <--> EBCDIC conversion for
parameters passed and returned?

Thanks,
Benny
Jul 17 '05 #1
6 5989
PHP is server side oriented.
ascii2ebcdic() and abcdic2ascii() functions in PHP translate from/to EBCDIC.

"Benny Hill" <be***********************************@yahoo.com > a écrit dans
le message de news:m%MJd.727$C24.5@attbi_s52...
I have a website (running on a linux machine) that currently makes use
of JSP to access data on an AS/400.

I've found information telling me that after setting up ODBC drivers on
the linux server I'll be able to access the databases on the AS/400
however I've not found any information about executing programs on the
AS/400.

I've looked at the docs for exec, passthru, etc. and it appears those
will only work on the local operating system.

Is it possible for a PHP page to execute a program on a remote machine?

If so, how does PHP handle the ASCII <--> EBCDIC conversion for
parameters passed and returned?

Thanks,
Benny

Jul 17 '05 #2
Speedy Gonzales wrote:
PHP is server side oriented.
ascii2ebcdic() and abcdic2ascii() functions in PHP translate from/to EBCDIC.


Unfortunately those two functions are only available on Apache that is
running on EBCDIC systems such as OS/390. My Apache is running on linux.

I've been doing a lot of searching on this and it appears that I'm going
to have to stick with Java on this project.

Thanks anyway Speedy.
Jul 17 '05 #3

I just came from a shop that used Websphere which was able to execute
programs on the AS/400(iSeries) and it worked just fine. It was
running on Windows using the Apache server. Sorrry no Linux info.

Jul 17 '05 #4
beebee wrote:
I just came from a shop that used Websphere which was able to execute
programs on the AS/400(iSeries) and it worked just fine. It was
running on Windows using the Apache server. Sorrry no Linux info.


Hmm... do you know if the calls to programs on the AS/400 were passing
parameters back and forth?

I did stumble across ssh2_* functions that will let you execute programs
on a remote server but trying to adapt that and integrate home-rolled
functions to convert EBCDIC <-> ASCII sounds like more work (and shaky
work at that!) than I want to mess with.

In case anyone is curious it appears they are working on this type of
functionality in the CVS version of PHP:
http://us4.php.net/manual/en/function.ssh2-exec.php

Thanks beebee, I appreciate the post.
Benny
Jul 17 '05 #5
Benny Hill wrote:
beebee wrote:
I just came from a shop that used Websphere which was able to execute programs on the AS/400(iSeries) and it worked just fine. It was
running on Windows using the Apache server. Sorrry no Linux info.

Hmm... do you know if the calls to programs on the AS/400 were

passing parameters back and forth?

Oh yeh, they were passing everything back and forth once you signed on.

It seems as though they offered other middleware to iseries programs.
http://www-912.ibm.com/, will probably give you soom other paths to
where you want to go other than this Java intensive Websphere doo-doo.
I think there was even a free software package available. Of course
you couldn't do any development or fancy screen facing that Websphere
allows. I'd be willing to bet that IBM will drop Java and take off
with something in PHP. It seems like they never want to be pinned down.

Jul 17 '05 #6
beebee wrote:
It seems as though they offered other middleware to iseries programs.
http://www-912.ibm.com/, will probably give you soom other paths to
where you want to go other than this Java intensive Websphere doo-doo.
I think there was even a free software package available. Of course
you couldn't do any development or fancy screen facing that Websphere
allows. I'd be willing to bet that IBM will drop Java and take off
with something in PHP. It seems like they never want to be pinned down.


Geez I hate IBM's website. I checked out your link to see if it would
take me anywhere new in the seemingly never-ending land of IBM.com and I
didn't see anything that looks helpful for my particular set up.
Everything on their site suggests using Websphere which is definitely
*not* what I want to do.

If my client was willing to run Apache/PHP directly on the AS/400 I
could probably make things work but they won't do that "because of
security reasons". Instead the web server resides on a separate linux
box (on the other side of two separate firewalls actually).

I'm glad that Big Blue is on the linux bandwagon though and the Java
Toolbox they provide for accessing data and programs on a 400 is
certainly acceptable. Just not my cup of tea.

Thanks again,
Benny
Jul 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Kyler Laird | last post: by
2 posts views Thread by brian_harris | last post: by
35 posts views Thread by Michel Sanner | last post: by
10 posts views Thread by sulekhasweety | last post: by
2 posts views Thread by John Wright | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.