Gets a numeric value from a numeric data area.
Retrieve a batch number #BATCH from data area named NEXTBATCH which should be located via the job's library list.
Increment the batch number value and place the incremented value back into the data area.
Make sure that no 2 jobs can be assigned the same batch number by using the lock and unlock options.
WITH_ARGS(NEXTBATCH '''*LIBL''' 'Y') TO_GET(#BATCH)
CHANGE FIELD(#BATCH) TO('#BATCH + 1')
WITH_ARGS(#BATCH NEXTBATCH '''*LIBL'' 'Y')