Connecting Tech Pros Worldwide Help | Site Map

PHP calling programs on AS/400

Benny Hill
Guest
 
Posts: n/a
#1: Jul 17 '05
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
Speedy Gonzales
Guest
 
Posts: n/a
#2: Jul 17 '05

re: PHP calling programs on AS/400


PHP is server side oriented.
ascii2ebcdic() and abcdic2ascii() functions in PHP translate from/to EBCDIC.

"Benny Hill" <benny_hill3.your_rose_colored_glasses@yahoo.com > a écrit dans
le message de news:m%MJd.727$C24.5@attbi_s52...[color=blue]
> 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[/color]


Benny Hill
Guest
 
Posts: n/a
#3: Jul 17 '05

re: PHP calling programs on AS/400


Speedy Gonzales wrote:[color=blue]
> PHP is server side oriented.
> ascii2ebcdic() and abcdic2ascii() functions in PHP translate from/to EBCDIC.[/color]

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.
beebee
Guest
 
Posts: n/a
#4: Jul 17 '05

re: PHP calling programs on AS/400



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.

Benny Hill
Guest
 
Posts: n/a
#5: Jul 17 '05

re: PHP calling programs on AS/400


beebee wrote:[color=blue]
> 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.
>[/color]

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
beebee
Guest
 
Posts: n/a
#6: Jul 17 '05

re: PHP calling programs on AS/400


Benny Hill wrote:[color=blue]
> beebee wrote:[color=green]
> > I just came from a shop that used Websphere which was able to[/color][/color]
execute[color=blue][color=green]
> > programs on the AS/400(iSeries) and it worked just fine. It was
> > running on Windows using the Apache server. Sorrry no Linux info.
> >[/color]
>
> Hmm... do you know if the calls to programs on the AS/400 were[/color]
passing[color=blue]
> parameters back and forth?
>[/color]
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.

Benny Hill
Guest
 
Posts: n/a
#7: Jul 17 '05

re: PHP calling programs on AS/400


beebee wrote:
[color=blue]
> 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.
>[/color]

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
Closed Thread