Page 1 of 1

REXX - Is it necessary to code FREE when ALLOC is used

PostPosted: Thu Jan 29, 2015 4:46 pm
by sachin-bh
A REXX tool is built and all the REXX modules in it has ALLOC but no where FREE is used.

I am trying to use a command to SCAN a job within the tool. The REXX module for this option will scan a specified JOB.
But when I am trying to scan a same Job many times, I am getting the error telling:

IKJ56866I DATA SET 'EMPOT02.EMPOT02T.JOB01307.D0000103.?' NOT ALLOCATED, CONCURRENT ALLOCATIONS EXCEEDED

The same message is appearing for all the below datasets:
EMPOT02.EMPOT02T.JOB01299.D0000003.JESJCL
EMPOT02.EMPOT02T.JOB01299.D0000004.JESYSMSG
EMPOT02.EMPOT02T.JOB01299.D0000103.?
EMPOT02.EMPOT02T.JOB01300.D0000002.JESMSGLG

But when I end the session and come back and try the same, its working fine.
My question is: Is FREE mandatory in such cases. If FREE is not used, when will the Deallocation of the allocated memory happen?
DECONCAT will this command help in this case?

Re: REXX - Is it necessary to code FREE when ALLOC is used

PostPosted: Thu Jan 29, 2015 7:53 pm
by NicC
I do not know why you posted in the FAQ section of the forum - I have moved it to the Rexx section.

Yes, you should code FREE as in any other language.