Problem solve Get help with specific problems with your technologies, process and projects.

Beware of QTEMP

Although QTEMP is the most preferred library when creating temporary objects, there are a few things to watch out for.

I chanced on this problem when working on a maintenance project and would like to share this with all readers. QTEMP is the most preferred library when creating temporary objects. The objects in QTEMP will automatically be deleted when the job ends. However, using QTEMP to create temporary objects is not the right approach when group jobs are involved. Invoking a group job from an interactive job is like starting a new iSeries 400 session or a new interactive job that will have it's own QTEMP. So data in the QTEMP of the interactive job is not retained when control is transferred to the group job. The best way to circumvent this problem is to create the object in QGPL and delete it when the group job is done. If parameters need to be passed to the group job, the best way is to transfer them through the group data area(*GDA is 512 bytes). I hope this tip will help anyone who is involved in application development/maintenance using group jobs.


The Best Web Links: tips, tutorials and more.

Ask your programming questions--or help out your peers by answering them--in our live discussion forums.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.

Dig Deeper on iSeries ILE programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.