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



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



2009/9/14 <web400-request@xxxxxxxxxxxx>:
Send WEB400 mailing list submissions to
web400@xxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.midrange.com/mailman/listinfo/web400
or, via email, send a message with subject or body 'help' to
web400-request@xxxxxxxxxxxx

You can reach the person managing the list at
web400-owner@xxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of WEB400 digest..."


*** NOTE: When replying to this digest message, PLEASE remove all text
unrelated to your reply and change the subject line so it is meaningful.
Today's Topics:

1. Re: WEB400 Digest, Vol 7, Issue 272 (Jon Paris)
2. Re: PHP Command Line Caller (Richard Schoen)
3. Re: PHP Command Line Caller (Scott Klement)
4. Re: starting/stopping Zendcore (Larry Kleinman)
5. Re: starting/stopping Zendcore (Mark Allen)


----------------------------------------------------------------------

message: 1
date: Sun, 13 Sep 2009 13:52:01 -0400
from: Jon Paris <jon.paris@xxxxxxxxxxxxxx>
subject: Re: [WEB400] WEB400 Digest, Vol 7, Issue 272

Hi Richard,

Nice - Wanna share?

I have been thinking that it might be useful to build a utility that
could pipe answers back via a queue. That would avoid the file opening
overhead and make things a little more snappy. Since you can get a
queues etc. vis the i5 components it should be doable.


Jon Paris

www.Partner400.com
www.SystemiDeveloper.com



On 13-Sep-09, at 1:00 PM, web400-request@xxxxxxxxxxxx wrote:

I written a CL command wrapper around the PHP-CLI calls so that I can
call a PHP script, let it do its thing and place the output into an
OUTFILE so I can process it from an RPG or CL program.

------------------------------

message: 2
date: Sun, 13 Sep 2009 12:50:56 -0600
from: "Richard Schoen" <richard@xxxxxxxxxxx>
subject: Re: [WEB400] PHP Command Line Caller

Thanks for the email sending sample.

I learned a couple new functions from your example.

Actually from my perspective there are UNLIMITED uses for PHP scripting
from an iSeries program.

It all depends on the imagination. I have a pretty vivid one :-)

As long as you can call a script and process the output from the script,
the entire PHP language and Zend Framework is at your disposal including
web service calls, PDF creation, etc.

All you have to remember is to use \n instead of <BR> in your script
responses so that each response comes out on its own line.

What limitations did you discover ?

Regards,
Richard Schoen
RJS Software Systems Inc.
"Get the information you need. Now!"
Document Management, Workflow, Report Delivery, Forms and Business
Intelligence
Email: richard@xxxxxxxxxxxxxxx
Web Site: http://www.rjssoftware.com
Tel: (952) 736-5800
Fax: (952) 736-5801
Toll Free: (888) RJSSOFT
------------------------------

message: 2
date: Sat, 12 Sep 2009 13:49:30 -0700
from: Tech Guru <techguru@xxxxxxxxxxxx>
subject: Re: [WEB400] PHP Command Line Caller

Richard,

Nice work! While there are limited applications to calling PHP from
RPG, it
is useful in some cases.

Jon Paris and I discussed some of the possibilities and inherent
limitations
at COMMON last year. This article in the link below is a direct result
of
that conversation.

http://www.mcpressonline.com/tips-techniques/web-languages/techtip-use-p
hp-and-zend_mail-to-send-email.html

I use a tool called SCSPDF to convert my spool files to PDF and then use
an
RPG/PHP email utility I wrote to distribute them.

Keep up the good work. :-)

- Jeff




------------------------------

message: 3
date: Sun, 13 Sep 2009 18:58:55 -0500
from: Scott Klement <web400@xxxxxxxxxxxxxxxx>
subject: Re: [WEB400] PHP Command Line Caller

I've actually been considering writing a SPECIAL file driver for running
QShell or PASE programs (including PHP). Parameters would determine
which tool to run and what the command line is. You'd write to the Unix
tool's STDIN using ordinary RPG output. Read from the Unix tool's
STDOUT using ordinary RPG input.

Actually, I started writing this tool awhile back... never finished it.
It got lost in the shuffle somewhere.

Interesting idea?


Richard Schoen wrote:
Hello All,

After playing around a bit and reading Jeffs PHP book and the Zend docs
I realized that PHP scripts can also be run outside the browser to do
stuff.

I written a CL command wrapper around the PHP-CLI calls so that I can
call a PHP script, let it do its thing and place the output into an
OUTFILE so I can process it from an RPG or CL program.

As an RPG developer using this technique will allow me to use PHP
scripts from any CL or RPG program.

Not bad for day two of learning :-)

Regards,
Richard Schoen
RJS Software Systems Inc.
"Get the information you need. Now!"
Document Management, Workflow, Report Delivery, Forms and Business
Intelligence
Email: richard@xxxxxxxxxxxxxxx
Web Site: http://www.rjssoftware.com
Tel: (952) 736-5800
Fax: (952) 736-5801
Toll Free: (888) RJSSOFT



------------------------------

message: 4
date: Mon, 14 Sep 2009 09:44:53 -0400
from: Larry Kleinman <larry@xxxxxxxxxxxxxxxxx>
subject: Re: [WEB400] starting/stopping Zendcore

This tells me how to start everything, but how do I stop everything? Is
it as simple as doing ENDSBS ZENDCORE/ZEND


Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
203-255-4100



BMay@xxxxxxxxx
Sent by: web400-bounces@xxxxxxxxxxxx
09/11/2009 03:47 PM
Please respond to
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>


To
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
cc

Subject
Re: [WEB400] starting/stopping Zendcore






Try this

http://www.zend.com/en/support/knowledgebase.php?kbid=298&view_only=1

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

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



Larry Kleinman <larry@xxxxxxxxxxxxxxxxx>
Sent by: web400-bounces@xxxxxxxxxxxx
09/11/2009 02:44 PM
Please respond to
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>


To
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
cc

Subject
[WEB400] starting/stopping Zendcore






Where can i find documentation telling me what programs are called from
the Zend Core for IBM i5/OS Setup Tool menu? Our nightly save turns
off
all of the HTTP servers on our system, then turns them back on again at
the end of the save, and I want to do the same with the Zend servers.

Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
203-255-4100
--
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.




------------------------------

message: 5
date: Mon, 14 Sep 2009 12:34:45 -0400
from: Mark Allen <scprideandms@xxxxxxxxx>
subject: Re: [WEB400] starting/stopping Zendcore

Heres my version of ENDZENDPHP and STZENDPHP commands that we use to
start
and stop Zend.
. . . : 1 80
Browse UNION/QCLSRC

ENDZENDPHP
...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7
...+... 8
*************** Beginning of data

***************************************************************************************
PGM
061215
DCL VAR(&TYPE) TYPE(*CHAR)
LEN(1) 070327

070327
RTVJOBA
TYPE(&TYPE)
070327
GOTO
CMDLBL(SUBMITTED)
090501
IF COND(&TYPE *EQ '1')
THEN(DO)
070327
SBMJOB CMD(CALL PGM(ENDZENDPHP)) JOB(ENDZENDPHP)
+ 070327

JOBQ(UNION/ZEND)
070327
SNDMSG MSG('ENDZEND Submitted...')
TOUSR(*SYSOPR) 070327
SNDMSG MSG('ENDZEND Submitted...')
TOUSR(*REQUESTER) 070327
GOTO
SUBMITTED
070327

ENDDO
070327

070327
ADDLIBLE LIB(ZENDCORE)
POSITION(*LAST)
061215
MONMSG
CPF0000
061215

070327
ADDLIBLE LIB(UNION)
POSITION(*LAST)
061215
MONMSG
CPF0000
061215

070327
ENDSBS SBS(ZEND)
OPTION(*IMMED)
061215
MONMSG
CPF1054
070219
DLYJOB
DLY(15)
080304

070327
ENDTCPSVR SERVER(*HTTP)
HTTPSVR(ZENDCORE)
061215
MONMSG MSGID(TCP1A77
CPFA097)
070226
DLYJOB
DLY(15)
080304

070327
ZENDCORE/ZCCENDEACD
PORT(6078)
061215
MONMSG MSGID(TCP1A77
CPFA097)
070226
DLYJOB
DLY(15)
080304
SNDMSG MSG('ENDZEND Completed...')
TOUSR(*SYSOPR) 070327
SNDMSG MSG('ENDZEND Completed...')
TOUSR(*REQUESTER) 070327
SUBMITTED:
070327
ENDPGM
061215


s . . . : 1 80
Edit UNION/QCLSRC

STRZENDPHP
...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7
...+... 8
*************** Beginning of data

***************************************************************************************
PGM
061215
DCL VAR(&TYPE) TYPE(*CHAR)
LEN(1) 070327

070327
MONMSG MSGID(CPF0000
TCP1A77)
070327
GOTO
SUBMITTED
090501
RTVJOBA
TYPE(&TYPE)
070327

070327
IF COND(&TYPE *EQ '1')
THEN(DO)
070327
SBMJOB CMD(CALL PGM(STRZENDPHP)) JOB(STRZENDPHP)
+ 070327

JOBQ(UNION/ZEND)
070327
SNDMSG MSG('STRZEND Submitted...')
TOUSR(*SYSOPR) 070327
SNDMSG MSG('STRZEND Submitted...')
TOUSR(*REQUESTER) 070327
GOTO
SUBMITTED
070327

ENDDO
070327

070327
CALL
RESETPHPC
070104
DLYJOB
DLY(15)
080304
ADDLIBLE LIB(ZENDCORE)
POSITION(*LAST)
061215
ADDLIBLE LIB(UNION)
POSITION(*LAST)
061215
STRSBS
SBSD(ZENDCORE/ZEND) 061215
MONMSG
MSGID(CPF1010) 061217
DLYJOB
DLY(15) 080304
STRTCPSVR SERVER(*HTTP)
HTTPSVR(ZENDCORE) 061215
DLYJOB
DLY(15) 080304
ZENDCORE/ZCCSTREACD LIB(ZENDCORE) PORT(6078) PJ(*ON)
+ 061215

RESTART(*YES) 061215
DLYJOB
DLY(15) 080304
SNDMSG MSG('STRZEND Completed...')
TOUSR(*SYSOPR) 070327
SNDMSG MSG('STRZEND Completed...')
TOUSR(*REQUESTER) 070327

090501
SUBMITTED:
070327
ENDPGM
061215



On Mon, Sep 14, 2009 at 9:44 AM, Larry Kleinman
<larry@xxxxxxxxxxxxxxxxx>wrote:
This tells me how to start everything, but how do I stop everything?
Is
it as simple as doing ENDSBS ZENDCORE/ZEND


Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
203-255-4100



BMay@xxxxxxxxx
Sent by: web400-bounces@xxxxxxxxxxxx
09/11/2009 03:47 PM
Please respond to
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>


To
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
cc

Subject
Re: [WEB400] starting/stopping Zendcore






Try this

http://www.zend.com/en/support/knowledgebase.php?kbid=298&view_only=1

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

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



Larry Kleinman <larry@xxxxxxxxxxxxxxxxx>
Sent by: web400-bounces@xxxxxxxxxxxx
09/11/2009 02:44 PM
Please respond to
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>


To
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
cc

Subject
[WEB400] starting/stopping Zendcore






Where can i find documentation telling me what programs are called from
the Zend Core for IBM i5/OS Setup Tool menu? Our nightly save turns
off
all of the HTTP servers on our system, then turns them back on again at
the end of the save, and I want to do the same with the Zend servers.

Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
203-255-4100
--
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.


--
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) digest 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.



End of WEB400 Digest, Vol 7, Issue 273
**************************************


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.