We have an iSeries running V5R3. We're working on embedding SQL into RPG LE programs and then creating stored procedures using this or a CLLE program. These stored procedures are then called from VB.NET. The programs on the iSeries create files in the QTEMP library and it is this data that is returned using the result set of SQL. We've got this working, but we've come up with some questions regarding how the iSeries handles it.
The VB.NET app calls the stored procedures on the iSeries by using the QZDASOINIT program in the QUSRWRK subsystem. Should there be a new instance of the QZDASOINIT program for each call of the stored procedure (if two different users make requests)? Are we "asking for trouble" by using files in QTEMP (we make sure they are cleared)? Do we need to worry about closing the QZDASOINIT program when a user closes their Web browser? If so, how?
I am not running V5R3 as of yet and have no knowledge of VB.NET, so my answer will be based upon my experiences in V5R2. I do not believe there should be a new instance of QZDASOINIT for each call of the store procedure, but a new instance for each access from the Web browser by user. So if the user "logs in" and runs several applications, logs out, then relogs in later, I would expect two different instances of the QZDASOINIT. As a general rule, using QTEMP is a good way to ensure that each person is getting only the data they request. Therefore, I think using QTEMP is a good idea and will be a way of maintaining data integrity.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: Tips, tutorials and more.
Visit the ITKnowledge Exchange and get answers to your systems management questions fast.
Read this Search400.com Featured Topic: Take control of your iSeries.
Ask the Experts yourself: Our systems management gurus are waiting to answer your technical questions.