473,898 Members | 3,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6091
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2064
by: Kyler Laird | last post by:
I need to submit C/C++ code for a class. (It's not a programming class. The choice of language is inertial. I think that it mostly serves to distract students from the course subject.) I'm fairly fluent with C but it hurts to think about writing in C when Python is *so* much more appropriate for these operations. I'd like to keep my sanity and satisfy the course requirements by programming in Python and converting the code to C. It...
19
4285
by: Ross A. Finlayson | last post by:
Hi, I hope you can help me understand the varargs facility. Say I am programming in ISO C including stdarg.h and I declare a function as so: void log_printf(const char* logfilename, const char* formatter, ...); Then, I want to call it as so:
2
1434
by: singlal | last post by:
Hi, my question was not getting any attention because it moved to 2nd page; so posting it again. Sorry for any inconvenience but I need to get it resolved fast. Need your help! **************************************************************************************************** Original Question: -------------------- Has anyone called a COBOL subroutine using COBOL CALL from a COBOL/DB2
2
2153
by: brian_harris | last post by:
I am tring to use trimstart to remove leading zeros, but all things I try give a compiler error on converting data. I am programing in C++ .net vs2003. This is one of my earlier attempts to call function empcode = empcode->TrimStart ('0'); This is result: c:\T02010_NET_ora9\cgi-bin\programs\TimeReader\TimeReaderWinService.cpp(322): error C2664: 'System::String::TrimStart' : cannot convert parameter 1 from 'char' to '__wchar_t __gc'...
35
2915
by: Michel Sanner | last post by:
Hello, One of the greatest feature of Python in my opinion is the way the interpreter can be used to integrate a wide variety of software packages by dynamically linking them. This approach has been extremely successful for us so far but now I run into a license nightmare. Some the libraries we wrapped using SWIG are under GPL but the applications we are distributing are not (mainly because
6
1556
by: priyanka | last post by:
Hi there, I want to learn about the calling convention that is adopted by the gcc compiler for C programs ? I need to learn about it immidiately for finding out the parameters passed to registers when a function call is made and print out the values of the parameters. Can anyone give me some pointers or refer to some book that would be helpful ? I tried searching at google but did not find any useful papers or reference. Thank you,
10
3278
by: sulekhasweety | last post by:
Hi, the following is the definition for calling convention ,which I have seen in a text book, can anyone give a more detailed explanation in terms of ANSI - C "the requirements that a programming system places on how a procedure is called and how data is passed between a calling program and procedures are called calling conventions"
2
2775
by: John Wright | last post by:
I have a central program I am starting to develop that will track processing deviations. This program is VB 2008 and needs to be called from VB 2005 programs and VB2008 programs (we have some VB 6 programs as well but I these are getting phased out). I need to call this program, pass the logged in user name, and fill in essential data from the calling program into the called program. I don't really want to create a deviation form for all...
0
13367
amitpatel66
by: amitpatel66 | last post by:
There is always a requirement that in Oracle Applications, the Concurrent Program need to be execute programatically based on certain conditions/validations: Concurrent programs can be executed programatically either from UNIX or Oracle PLSQL. In this Section, I will be explaining about calling a Concurrent program from UNIX using the CONCSUB Command. Pre-requisite: 1. Concurrent Program should be registered in oracle Applications...
0
9993
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9841
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10948
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10484
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8036
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7187
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5881
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4296
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3305
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.