Jon,  Thank you for the write up.  I used the DATASET and this works fine.

George, Paul and Tom, Thank you for also pointing out the ddnames.  Yes, I 
retyped the exec and see an incorrect "DNAME".
 

This is my new EXEC:

'LMINIT DATAID(INDD) DATASET('PMSBDH.LIB.DOC') ENQ(EXCLU)'
'LMINIT DATAID(OUTDD) DATASET('VPS.WORKSPC') ENQ(EXCLU)'

'LMCOPY FROMID('INDD') TODATAID('OUTDD')
   FROMMEM(VPSBYNET) TOMEM(VPSBYNET)
   REPLACE'

'LMCOPY FROMID('INDD') TODATAID('OUTDD')
   FROMMEM(VPSBYDST) TOMEM(VPSBYDST)
   REPLACE'

'LMCOPY FROMID('INDD') TODATAID('OUTDD')
   FROMMEM(XESPRTRS) TOMEM(XESPRTRS)
   REPLACE'

'LMFREE DATAID('INDD')'
'LMFREE DATAID('OUTDD')'


   Thanks again to all that helped,  Dave



-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Thomas Berg
Sent: Wednesday, October 23, 2013 11:46 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Allocation problem with LMCOPY

BTW, I see that you wrote:

LMINIT DATAID(INDD) DNAME(LMIN) ENQ(SHRW)

it should be:

LMINIT DATAID(INDD) DDNAME(LMIN) ENQ(SHRW)   (NOTE DDname, not Dname.)



Best Regards
Thomas Berg
___________________________________________________________________
Thomas Berg   Specialist   zOS\RQM\IT Delivery   SWEDBANK AB (Publ)



> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] 
> On Behalf Of Thomas Berg
> Sent: Wednesday, October 23, 2013 5:23 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Allocation problem with LMCOPY
> 
> Do:
> 
> Address TSO FREE FI(LMIN LMOUT)  (NOTE the ddnames...)
> 
> 
> 
> Best Regards
> Thomas Berg
> ___________________________________________________________________
> Thomas Berg   Specialist   zOS\RQM\IT Delivery   SWEDBANK AB (Publ)
> 
> 
> > -----Original Message-----
> > From: IBM Mainframe Discussion List 
> > [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Hansen, Dave L - 
> > Eagan, MN
> > Sent: Wednesday, October 23, 2013 5:04 PM
> > To: IBM-MAIN@LISTSERV.UA.EDU
> > Subject: Allocation problem with LMCOPY
> >
> > CROSS POSTED to ISPF-L and IBM-MAIN
> >
> > Dear Helpers,
> >
> >    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?
> >
> >
> >
> >       Thank you,  Dave
> >
> > --------------------------------------------------------------------
> > -- For IBM-MAIN subscribe / signoff / archive access instructions, 
> > send email to lists...@listserv.ua.edu with the message: INFO 
> > IBM-MAIN
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send 
> email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to