The place for general PHP questions and hints for PHP on IBM i
4 posts • Page 1 of 1
I have a legacy program that creates a table of metrics in QTEMP. I'd like to call the program from PHP, then read the QTEMP table and then delete it, all in one request cycle. I'm running the toolkit "stateless" which says that the XTOOLKIT requests are handled in the SQL server job, but I suspect that even though I'm in a single request cycle, the DB connection I obtain for reading the temporary table may not be the same SQL server job that handled the toolkit request, and therefore I may not have access to the QTEMP table I just created. Any thoughts, ideas or suggestions?
Since you are using stateless mode, you can be assured that they're sharing the connection if you pass the database connection resource into the toolkit's "getInstance" method, as the first parameter.
I'm no longer sure I can use stateless mode for the toolkit. Is there a way to get to QTEMP files generated in the XTOOLKIT jobs? Basically, I want to call a pgm that creates my data in QTEMP, then I'll read the data and then drop the file -- all in 1 request cycle.