Using RESDEF SET INCREMENT(?) on Depletable Resources
search cancel

Using RESDEF SET INCREMENT(?) on Depletable Resources


Article ID: 234501


Updated On:


ESP Workload Automation


Using a self-completing task to issue ESPNOMSG RESDEF <resname> SET INCREMENT(1) to let another APPL use the resource for x number of files received.

When there are multiple generations of the APPL that uses the resource, all will run when the SET INCREMENT(1) command is issued.

The APPL that uses the resource created by the job has JOB_ANCESTOR_WAIT(ANY) but have still seen 5 generations run with 1 resource given. 


Release : 12.0



In our documentation it is said that INCREMENT could be used "to increment the maximum count of the resource". That statement is correct and exact. But that statement is irrelevant to a resource type.
The parameter INCREMENT should not be used with DEPLETABLE resources.

You can find in the docs, that the DEPLETABLE resources have only one counter for the units available. That is NOT true.

Each resource type has two counters, AVAIL and MAX. However for the DEPLETABLE resource type, setting any of them with the particular keyword MAX or AVAIL, will set the MAX to the given value and reset the availability counter AVAIL to the value of MAX counter. The INCREMENT parameter on the other side increases "only" the MAX counter value.

What is the "problem" with that?
The depletion itself.

Once the resource unit of a DEPLETABLE resource is used, i.e. depleted, only the AVAIL counter is decreased. Same as with RENEWABLE resource type. But the MAX counter is also retained as with the RENEWABLE type. And thus using the INCREMENT, which only increases the MAX counter, the previous MAX value is taken and increased. Then the AVAIL counter value is updated to this new MAX value.


Use either SET MAX(1) or SET AVAIL(1) to make one depletable resource unit available instead of SET INCREMENT(1).