This section describes the operation commands on resources. The resource must have been condition-checked with quotas before being able to execute one of the uxhld, uxrls or uxshw commands. Also refer to section "Resources" for setting commands.
The command uxhld RES enables total or partial allocation of a resource. If the resource contains one or more of the following variable elements !SOC!, !MU! (or !UG!) or !DTRAIT!, quota allocated will take into account the value of these elements in the command. If the resource contains none of the variable elements !SOC!, !MU! (or !UG!) or !DTRAIT!, any values provided for these elements in the command will be ignored.
Its syntax is as follows:
uxhld RES RES=resource LOCK QT1=quota1 QT2=quota2 [MU=mu] [PDATE=date] [ESP=X|S|I|A|*|" "] [TSOC=company]
The command uxrls RES enables total or partial de-allocation of a resource. The uxrls res command invokes the I/O servers of all areas and can be time consuming. In order to optimize the performance, the node setting U_RES_AVAIL_AREAS (Advanced Settings category) should be set to the area code of the active areas. Refer to the Univiewer User Guide.
Its syntax is as follows:
uxrls RES RES=resource CLEAR QT1=quota1 QT2=quota2 [MU=mu] [PDATE=date] [ESP=X|S|I|A|*|" "] [TSOC=company]
Note: The OS/400 command UXRLSRES frees a resource from the command line. The F4 key allows the user to enter each parameter individually. The F11 key displays the name of each parameter.
The command uxshw RES displays details of the definition and allocation of a resource. Its syntax is as follows:
uxshw RES RES=resource [MU=mu] [PDATE=date] [ESP=X|S|I|A|*|" "] [TSOC=company] [INF|FULL|RSV] [OUTPUT=filename]
The command uxrsv RES enables a resource to be reserved for a task so as to define a scheduling priority. Its syntax is as follows:
uxrsv RES RES=resource [TSK=task] UPR=uproc [VUPR=version] [SES=session] [VSES=version] MU=mu [QT1=quota1] [QT2=quota2] [PDATE=date] [ESP=X|S|I|A|*|" "] [TSOC=company]
The command uxcnr RES enables reservation of a resource via the command uxrsv to be deleted. Its syntax is as follows:
uxcnr RES RES=resource [TSK=task] UPR=uproc [VUPR=version] [SES=session] [VSES=version] MU=mu [PDATE=date] [ESP=X|S|I|A|*|" "] [TSOC=company]
The command uxpre RES deletes the event resources for which the quotas have been released (!UG!, !PDATE!, !SOC! or !ESP! can be used to variabilize the resource). Its syntax is as follows:
uxpre RES RES=resource [MU=mu] [PDATE=date] [ESP=X|S|I|A|*|" "] [TSOC=company]
RES=
Resource identifier. Enter the resource reference or * (wildcard accepted with the uxshw command using the FULL option)
Format: 64 alphanumeric characters.
LOCK
(Incompatible with QT1 and QT2) Overall allocation. Reserves the totality of the selected resource. Used in uxhld, the resource is totally reserved.
QT1= or QT2=
(Incompatible with LOCK and CLEAR) Level 1 & 2 allocation quotas.
Format: from 0 to 9999.
CLEAR
(Incompatible with QT1 and QT2) Overall resource de-allocation. Releases the selected resource. Used in uxrls res (or UXRLSRES on OS/400) command, the resource’s quotas are released in totality whatever the origin of the initial allocation.
TSK=
(Mandatory if UPR is absent) Task code that reserves or liberates the resource.
Format: 64 alphanumeric characters.
UPR=
(Mandatory if TSK is absent) Uproc code. Only commands uxrsv and uxcnr. Enter a Uproc code which is the identifier of the task which reserves or releases the resource or * (wildcard accepted except for uxrsv).
Format: 64 alphanumeric characters.
VUPR=
(Optional) Uproc version. Only commands uxrsv and uxcnr. Allows a particular version of a Uproc to be entered. By default, all versions of filled-in Uprocs are considered (serves no purpose with SIM and EXP).
Format: 3 numerical characters.
SES=
(Optional) Session code. Only commands uxrsv and uxcnr. Enter a session code which is the identifier of the task which reserves or releases the resource or * (wildcard accepted except for uxrsv).
Format: 64 alphanumeric characters.
VSES=
(Optional) Session version. Only commands uxrsv and uxcnr. Allows a particular version of a session to be entered. By default, all versions of filled-in sessions are considered (serves no purpose with EXP).
Format: 3 numerical characters.
MU=
(Optional) Management unit. Enables the selection of resources which refers to a management unit either in the file name or its localization. For commands uxrsv and uxcnr, enables the task which reserves or releases the resource to be identified.
Format: 64 alphanumeric characters. Use of the "*" (asterisk) will select all resources referring to an management unit. Use of the character " " (blank) will select all resources which bear no management unit reference.
PDATE=
(Optional) Processing date. Enables the selection of resources which refers to a processing date either in the file name or its localization. For commands uxrsv and uxcnr, enables the task which reserves or releases the resource to be identified.
Format: YYYYMMDD. Use of the "*" (asterisk) will select all resources referring to a processing date. Use of the character " " (blank) will select all resources which bear no processing date reference.
ESP=
(Optional) Area code. Enables the selection of resources which refers to a area either in the file name or its localization. For commands uxrsv and uxcnr, enables specification of in which area the task which has made the reservation is to be found.
Format: 1 character: "X" "S" "I" "A" "*" or " ". Use of the "*" (asterisk) will select all resources referring to an area. Use of the character " " (blank) will select all resources which bear no area reference.
Default: S_ESPEXE variable value.
TSOC=
(Optional) Company code. Enables the selection of Resources which refer to a company either in the file name or its localization.
Format: 6 alphanumeric uppercase characters. Use of the "*" (asterisk) will select all resources referring to a company. Use of the character " " (blank) will select all resources which contain no company reference.
INF | FULL | RSV
(Optional) Display option for uxshw RES command.
Default: INF
OUTPUT=
(Optional) Output file for display storage of uxshw command. If the item is not supplied, the output is sent to screen.
Allocates a Level 1 quota of 4 units to the resource "D_BASE" in the current environment (Company & node).
uxhld RES RES=D_BASE QT1=4
Displays allocations of the resource D_BASE in the current environment (company, node), for example:
uxshw RES RES=D_BASE FULL
Query Res: D_BASE * * |
Use of resource quotas |
Resource: D_BASE Mode: Exec: |
Quotas maxi Auto. Alloc. Man. Alloc. Remainder |
0010 0010 0000 0000 0004 0000 0006 0010 |
If, during execution of the Uproc D_LOAD_FIL (which has a resource condition on the whole of D_BASE), an identical command is executed on the management unit and the area of execution, the following result is obtained:
Query Res: D_BASE * * |
Use of resource quotas |
Resource: D_BASE Mode: Exec: |
Quotas maxi Auto. Alloc. Man. Alloc. Remainder |
0010 0010 0000 0000 0004 0000 0006 0010 |
Use of resource quotas |
Resource: D_BASE X MICKEY Mode: Exec: EXCL |
Session Uproc Ar M.U. Proc.Dat Qta1 Qta2 X Numproc |
D_LOAD_FIL X MICKEY 0010 0010 O 0000013 |
Quotas maxi Auto. Alloc. Man. Alloc. Remainder |
0010 0010 0010 0010 0000 0000 0000 0000 |
The resource D_BASE is actually made up of two resources (symbolized in the example by the two boxes) depending on its execution environment. The first allocation results from the execution of the uxhld command, the second from the execution of the Uproc D_LOAD_FIL.
Releases all the quotas of the resource D_BASE allocated on behalf of all management units and areas.
uxrls RES RES=D_BASE ESP=* MU=* clear
Reserves, for the task defined by the Uproc IU_DT1, the Management unit S01 in the production area, for the current processing date, the resource with the reference PRIO_ORDO with a quota QT1 of 90.
uxrsv RES RES=PRIO_ORDO ESP=X UPR=IU_DT1 MU=S01 QT1=90 QT2=0 PDATE=${S_DATRAIT}
Note: The S_DATRAIT variable is defined internally in the Uproc script.
If the resource has a maximum quota QT1 of 100, 10 remain unallocated after the execution of the command. Another task which has not reserved any of this resource can be run if its condition on this resource requires a quota of 10 or less.
uxrsv RES RES=PRIO_ORDO ESP=X UPR=IU_DT2 MU=S01 QT1=10 QT2=0 PDATE=$D_DATRAIT
These last two commands define a priority for condition checking by Dollar Universe. The task which has reserved the most quotas will be run first, in this case the one defined on Uproc IU_DT1.
Releases the reservation made on the resource PRIO_ORDO by the task defined by Uproc IU_DT2, management unit S01 in the production area.
uxcnr RES RES=PRIO_ORDO ESP=X UPR=IU_DT2 MU=S01 PDATE=$D_DATRAIT
Note: The S_DATRAIT variable is defined internally in the Uproc script.