× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



If we do not tie our code to a particular hardware platform - then why use that platform? Why use a sophisticated server like an iSeries when a less expensive Intel based system can do the same job? Just stick a linux server in and switch off the system i.

If everything on the system i can run on Intel, then it is inevitable that the system i will eventually be replaced by Intel based solutions. The system i will Die!!!

Businesses buy "proprietry" hardware because they believe it is cost effective. Because this "proprietry" hardware has something to offer over the other systems available. If these aditional features are not going to be used, there is no point in buying "proprietry" hardware. It is a bit like buying a car with sat nav, and then refusing to use the sat nav because it is not standard in other cars!!

I am all in favour of using all the features of the hardware and software available, and "IF" the business decides it wants to change platform at at some future date, then that is a separate probem, an entirely different project, and an entirely different budget.

IBM's system i is a superb computer system, with a top class operating system in i5/OS. It would be a shame to waste it.

Syd Nicholson


Shalom Carmel wrote:
lol, yes too easy :))

By tying your code into the platform you lose modularity and agility.
That is the strength of modular programming, and that is why nearly
everything on Unix/Linux/PASE and even windows, uses stdout and stdin
along with piping and redirection.

your php script does something and writes the result to stdout. At
some point you may want to deploy your code on another non i platform,
or may want to do something else based on the output.

Regards,
Shalom Carmel
-----------------------
www.hackingiseries.com




from: Vern Hamberg <vhamberg@xxxxxxxxxxx>
subject: Re: [WEB400] Getting PHP to write back to a data queue

Too easy!!

BMay@xxxxxxxxx wrote:
Why not just use i5_dtaq_send directly in the PHP code?

Brian May
Project Lead
Management Information Systems
Garan, Incorporated
Starkville, Mississippi

Young i Professionals
http://www.youngiprofessionals.com



Shalom Carmel <shalom@xxxxxxxxxx>
Sent by: web400-bounces@xxxxxxxxxxxx
09/15/2009 09:42 AM
Please respond to
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>


To
web400@xxxxxxxxxxxx
cc

Subject
[WEB400] Getting PHP to write back to a data queue






It is actually simpler than it seems. The xargs utility is great at
intercepting standard output and doing stuff with it, like passing it
to another program.

Step 1: Write a CL program wrapper for the QSNDDTAQ API. Let's call it
P1 and let it accept a string and a queue name.
Step 2: pipe the stdout of the php script to the xargs PASE tool, like
this:

yourPHPscript.sh | xargs -i system "call P1 '{}' queuename"

I like this approach because it promotes writing modular programs,
although there is a slight performance penalty.

Regards,
Shalom Carmel
-----------------------
www.hackingiseries.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.