Question & Answer
Question
What is the purpose of the QTEMP library.
Answer
IBM i QTEMP Library:
Every job on the IBM i system has a unique QTEMP library available for use within that job. This library is used by both user applications and the operating system to create and manage temporary objects.
Characteristics of QTEMP:
QTEMP libraries have the following characteristics:
- Each job has its own unique QTEMP library.
- Objects created in QTEMP are deleted automatically when the job ends.
- QTEMP libraries are created as permanent system objects to survive abnormal IPLs.
- During IPL, the system deletes any remaining objects in QTEMP to prevent orphaned objects.
- If QTEMP were temporary, objects could become orphaned and require recovery using RCLSTG.
Security Aspects:
From a security standpoint, QTEMP libraries are designed to be isolated and secure:
- QTEMP libraries have special attributes that prevent them from being accessed by other jobs.
- User-written programs cannot locate or access another job's QTEMP library.
Object Attributes in QTEMP:
Objects created in QTEMP have the same attributes as those created in other libraries such as QGPL:
- External objects types like *FILE, *PGM, *DTAARA are created as permanent.
- This ensures they can be moved from QTEMP to another library if needed.
Auditing Considerations:
- Certain auditing functions may not log activity for objects created in QTEMP. This is due to the temporary and job-specific nature of the library, which limits the scope of auditing.
- The following actions on objects in the QTEMP library will NOT be audited when the value *NOQTEMP is specified on the QAUDCTL system value.
- Changing or reading objects in QTEMP (journal entry types ZC, ZR).
- Changing the authority, owner, or primary group of objects in QTEMP (journal entry types CA, OW, PG).
- The following actions on objects in the QTEMP library will NOT be audited when the value *NOQTEMP is specified on the QAUDCTL system value.
Note: The create of objects into QTEMP library and the delete of objects from QTEMP library are never audited.
Additional Notes
- QTEMP is essential for temporary data processing and job-specific operations.
- Proper understanding of QTEMP behavior is important for system recovery and security planning.
[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CHjAAM","label":"Job and Work Management"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0;7.1.0;7.2.0;7.3.0;7.4.0;7.5.0;7.6.0"}]
Was this topic helpful?
Document Information
Modified date:
11 July 2025
UID
ibm17239493