× 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.



Also, if you write your code correctly (e.g. use abstraction techniques for
platform specific code) then you are still developing portable applications
while taking full advantage of the strength of the specific platforms.

- Jeff


On Wed, Sep 16, 2009 at 6:57 AM, <BMay@xxxxxxxxx> wrote:

But the problem at hand was to put the returned data into a dataque.
Dataque's are already platform dependent. So why try to make it
"portable" when it would be useless on any other platform anyway.

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/16/2009 05:44 AM
Please respond to
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>


To
web400@xxxxxxxxxxxx
cc

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






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


--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.


--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



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.