CL Command Reference - SETASPGRP

CL Command List > SETASPGRP Reference

Description:

The Set Auxiliary Storage Pool Group (SETASPGRP) command sets the auxiliary storage pool (ASP) group for the current thread. Additionally, this command allows you to change the libraries in the library list for the current thread. If an ASP group had already been set, this command will remove the old ASP group from the current thread and set the specified ASP group for the current thread. Once the specified ASP group has been set for the current thread, all libraries in the independent ASPs in the ASP group are accessible and objects in those libraries can be referenced using regular library-qualified object name syntax. The libraries in the independent ASPs in the specified ASP group plus the libraries in the system ASP (ASP number 1) and basic user ASPs (ASP numbers 2-32) form the library name space for the thread. All libraries in the library list need to be in the new library name space or the library list is not changed and the new ASP group is not set.

Restrictions:

. You must have use (*USE) authority to all ASP device descriptions in the ASP group and to all the specified libraries in the library list before the library name space and the library list are changed. If you are not authorized to an ASP device description or to one of the libraries, the ASP group will not be set and the library list will not be changed.

. When *CURUSR is specified for the ASP group (ASPGRP) or Libraries for current thread (USRLIBL) parameter, you must have read (*READ) authority to the job description listed in your user profile and execute (*EXECUTE) authority to the library where the job description is located.

. The SETASPGRP command is not allowed in the following:
每 System jobs QPFRADJ, QJOBSCD, QSYSARB, QSYSARB3, QSYSARB4 and QLUS.
每 All subsystem monitor jobs.
每 DDM, DRDA, database host server and SQL server jobs once the initial namespace has been established.
每 Receive Journal Entry (RCVJRNE) and Delete Journal Receiver (DLTJRNRCV) command exit programs.
每 Management Central Registered Inventory Gathering Service (RIGS) Exit Programs (exit point QIBM_QYIV_INVGTRSRV).
每 Trigger or format selector programs that run as part of database I/O operations.
每 Attention programs (the PGM parameter of the SETATNPGM command).
每 Break handling programs (the PGM parameter of the CHGMSGQ command).
每 Programming Development Manager (PDM) functions.


Examples:

Example 1: Set New ASP Group

SETASPGRP ASPGRP(WAREHOUSE1) SYSLIBL(*SYSVAL) CURLIB(*CURUSR)
USRLIBL(*CURSYSBAS)

This command will set the auxiliary storage pool (ASP) group for the thread in which the command runs to be WAREHOUSE1. This will change the library name space for the thread to include all libraries in any of the independent ASPs in the ASP group identified by the independent ASP device named WAREHOUSE1. The system part of the library list will be set from system value QSYSLIBL. The current library entry of the library list will be set from the Current library value defined in the user profile that the thread is currently running under. The user part of the library list will be set using the current user part of the library list and removing any libraries that are not found in the system ASP or configured basic user ASPs.



Example 2: Set to No ASP Group

SETASPGRP ASPGRP(*NONE) SYSLIBL(*CURSYSBAS) CURLIB(*CRTDFT) USRLIBL(*NONE)

This command will remove any ASP group for the thread in which the command runs. This will change the library name space for the thread to include only those libraries in the system ASP (ASP number 1) and basic user ASPs (ASP numbers 2-32). The system part of the library list will be set using the current system part of the library list and removing any libraries that are not found in the system ASP or configured basic user ASPs. The current library entry of the library list will be changed to be empty which will cause library QGPL to be used as the current library. The user part of the library list will be changed to be empty.