Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
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:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
ASPGRP | ASP group | Name, *CURUSR, *NONE | Required, Positional 1 |
SYSLIBL | System library list | *CURSYSBAS, *SYSVAL | Optional |
CURLIB | Current library | Name, *CURSYSBAS, *CURUSR, *CRTDFT | Optional |
USRLIBL | Libraries for current thread | Single values: *CURSYSBAS, *CURUSR, *SYSVAL, *NONE Other values (up to 250 repetitions): Name |
Optional |
Top |
Specifies the name of the auxiliary storage pool (ASP) group to set for the current thread. The ASP group name is the name of the primary ASP device within the ASP group.
This is a required parameter.
Top |
Specifies the system part of the library list for the thread in which the command is entered.
Top |
Specifies the library to be used in the current library entry of the library list for the thread. If *CURUSR or a library name is specified and the library cannot be found in the new library name space, an error message is sent and the library list and ASP group are not changed.
Top |
Specifies the libraries that are placed in the user part of the library list. If *CURUSR or a list of library names is specified and any of these libraries cannot be found in the new library name space, an error message is sent and the library list and ASP group are not changed.
Single values
Other values (up to 250 repetitions)
Top |
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.
Top |
Top |