On 2013-10-23, at 09:04, Hansen, Dave L - Eagan, MN wrote:

> CROSS POSTED to ISPF-L and IBM-MAIN
> 
>   LMFREE doesn't have any extra parameters.  I keep getting a message about 
> "ALREADY IN USE,  TRY LATER+", "DATA SET IS ALLOCATED TO ANOTHER JOB OR 
> USER".  GRS shows I'm doing this to myself.  This is my LMCOPY EXEC:
> 
>   ALLOC FI(LMIN)    DA('file1') OLD REUSE
>   ALLOC FI(LMOUT) DA('file2') OLD REUSE
>   Address ISPEXEC
>   LMINIT DATAID(INDD) DNAME(LMIN) ENQ(SHRW)
>   LMINT DATAID(OUTDD) DDNAME(LMOUT) ENQ(SHRW)
>   LMCOPY FROMID('INDD') TODATAID('OUTDD') FROMMEM(mema) TOMEM(mema) REPLACE
>   LMFREE DATAID('INDD')
>   LMFREE DATAID('OUTDD')
> 
>   The LMFREE does not generate an error.  I get no errors running the EXEC 
> and it does what I want.  Except it's doesn't free my dataset.
> 
>   I added:  Address TSO FREE FI(INDD OUTDD).  It generated an error "FILE 
> INDD NOT FREED, IS NOT ALLOCATED".
> 
> Q).  Do I need to OPEN and CLOSE to do an LMFREE correctly?
>  
o I believe that ISPF LM services are designed to do their own
  ENQueues; it is sufficient to ALLOCATE SHR.

o To undo the ALLOCATE, you need do ADDRESS TSO FREE ... after each
  LMFREE.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to