Hi Group,
I would like to know what is the usage of QTEMP and QGPL. I know that, Every job has its own QTEMP library. The library gets cleared every time the job ends. So, this is a great place to put truly temporary files. Are there any other uses of QTEMP. Do we need to include these libraries in the user portion of the library list?
Regards,
M
It's never necessary to list libraries in a library list, but it's often a good idea.
You include a library in a library list so that unqualified object references can be resolved to actual objects. Objects can always be accessed by qualified references, and that avoids needing to do a search through libraries in a list.
The order of libraries in the library list determines which libraries are searched first. For many sites, that tends to cause QTEMP to be listed first. It should have very few objects, and it makes it easier to substitute temporary objects that have the same names as production objects.
A 'temporary' object in QTEMP is necessarily created within the job itself, and it's therefore always known by the job. In such cases, it can be a good idea to qualify most or all such references to avoid potential confusion with permanent objects. It really depends on what your site does with its programming.
Whether or not QGPL needs to be in a user's library list would depend on whether or not your site stores objects for users in there.or you use any of the IBM-supplied objects from there. (Personally, I prefer not using those directly for users.)
Adding QTEMP to a library list may be beneficial to your programmers. They can compile a program to QTEMP for testing/debugging. They would just need to move it to the top of their LIBL if it's not the first one already.
As a rule of thumb I've always followed is leave the QGPL library to IBM. If they have any updates to that library it may destroy your object if the have the same name. The chances may be slim by why risk it.
Programs can be compiled in to and called out of QTEMP without having QTEMP in the library list. Some parts are slightly easier, but none are real issues. That said, I essentially always have QTEMP at the top of my (user) library list. There's never enough in it to be a problem. -- Tom
I did not set up our system our user profiles. I know there are much better ways than what we are doing. Our QTEMP library is the 8th one down. Yes 8th, just after our production and development libraries...I agree Tom on the QTEMP usage. Unfortunately we have some people that may forget to qualify a program call and run the production version instead of their test. Even worse if they put test databases/files in QTEMP and forget to move QTEMP to the top of their LIBL.
It's hard to think of a good reason to have QTEMP late in the list. It'd seem better not to have it in the list at all so that references would always be qualified by standard. Good luck is needed. -- Tom
I have found it's a good idea to place QTEMP first in your library list behind your system libraries. This is the place for temporary objects that you know an application is going to need. In some cases, your application may create temporary objects based on empty production files lower in the library list. Having QTEMP first has several advantages and will insure your application will get the correct "temp" file to use. Of course, all environments are different and you need to determine what works best for you.
QGPL should be last and should not contain any application programs or files. It's been my experience that QGPL can be a dumping ground for everything and it's not good practice in my opinion.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 6  Replies
It's never necessary to list libraries in a library list, but it's often a good idea.
You include a library in a library list so that unqualified object references can be resolved to actual objects. Objects can always be accessed by qualified references, and that avoids needing to do a search through libraries in a list.
The order of libraries in the library list determines which libraries are searched first. For many sites, that tends to cause QTEMP to be listed first. It should have very few objects, and it makes it easier to substitute temporary objects that have the same names as production objects.
A 'temporary' object in QTEMP is necessarily created within the job itself, and it's therefore always known by the job. In such cases, it can be a good idea to qualify most or all such references to avoid potential confusion with permanent objects. It really depends on what your site does with its programming.
Whether or not QGPL needs to be in a user's library list would depend on whether or not your site stores objects for users in there.or you use any of the IBM-supplied objects from there. (Personally, I prefer not using those directly for users.)
Tom
Adding QTEMP to a library list may be beneficial to your programmers. They can compile a program to QTEMP for testing/debugging. They would just need to move it to the top of their LIBL if it's not the first one already.
As a rule of thumb I've always followed is leave the QGPL library to IBM. If they have any updates to that library it may destroy your object if the have the same name. The chances may be slim by why risk it.
QGPL should be last and should not contain any application programs or files. It's been my experience that QGPL can be a dumping ground for everything and it's not good practice in my opinion.