I would echo Brian comments and if not make sure you are using a
PCONNECT!
Regards,
Mike
mike.p@xxxxxxxx Cell: (408)679-1011 Office: (815)722-3454
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of BMay@xxxxxxxxx
Sent: Monday, October 05, 2009 1:17 PM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Can you read a file in QTEMP on the i5 via the PHP
script? I THINK SO!
Something to be aware of. Each request or "click" from your browser
goes
to any one of multiple webserver jobs on the system. In your design,
your
php script calls the RPG which puts data in QTEMP for which ever
webserver
you are running under at the moment. When you click a link on your
"subfile" webpage, there is absolutely no guarantee that your request
will
go to the same webserver instance. Therefore you cannot assume that
the
data in QTEMP will be there from a previous request. You will have
to
reload that "subfile" data every time your application needs it. Not
necessarily the best approach.
If it were me, I would take the time to revamp your application.
Take
your business rules and database access and move it out into a
service
program. Then both RPG and PHP can access the same procedures. You
end
up with a service program, or programs, serving a very simple RPG
program
that does nothing but load a subfile and display it and a simple PHP
script that does the same thing in the web environment.
Brian May
Project Lead
Management Information Systems
Garan, Incorporated
Starkville, Mississippi
Young i Professionals
[1]
http://www.youngiprofessionals.com
"Tom Deskevich" <thomas.l.deskevich@xxxxxxxxxxxxx>
Sent by: web400-bounces@xxxxxxxxxxxx
10/05/2009 12:14 PM CDTPlease respond toWeb Enabling the AS400 /
iSeries
To <web400@xxxxxxxxxxxx>
cc
bcc Brian May/GARAN
Subject [WEB400] Can you read a file in QTEMP on the i5 via the
PHP
script?I THINK SO!
It appears from my testing that you can access QTEMP via a PHP
script.
It will even though the RPG program has ended. I call a CL to call
the
RPG,
do not know if that matters.
Instead of writing to a subfile, I write to a physical file in QTEMP.
I
can
read that file in and present it to the web page.
I hope to get to the point that the RPG program can be used for 5250
and
web, and write to a display or physical file. But now I am just
fudging
things to see if I can prove concepts.
Any input on this matter would be greatly appreciated. I asked a
programmer
at my last place of employment, and he said they do stored procedures
with
SQL.
Tom Deskevich
Infocon Corporation
Phone 814-472-6066
Fax 814-472-5019
--
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: [2]
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at [3]
http://archive.midrange.com/web400.
References
Visible links
1.
http://www.youngiprofessionals.com/
2.
http://lists.midrange.com/mailman/listinfo/web400
3.
http://archive.midrange.com/web400
As an Amazon Associate we earn from qualifying purchases.