You are right , I was thinking of the case when you use the format
'LMINIT DATAID(LMID) DATASET('dsn') ENQ(SHR)'
Here it allocates a ISPnnnnn dd.



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 Paul Gilmartin
> Sent: Wednesday, October 23, 2013 10:49 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Allocation problem with LMCOPY
> 
> On 2013-10-23 10:55, Thomas Berg wrote:
> >> -----Original Message-----
> >> From: Paul Gilmartin
> >> Sent: Wednesday, October 23, 2013 6:45 PM
> >>
> >> On Wed, 23 Oct 2013 09:21:25 -0700, Jon Perryman wrote:
> >>
> >>> 1. LMINIT allocates a new DD. The DDNAME is placed in the variable
> >>> you specified in DATAID.
> >
> > LMINIT do really create a new allocation with a ddname in the format
> ISPnnnnn, e g ISP12345.
> > Presumably it frees it a LMFREE.
> >
> Not by my experiment.  The EXEC:
> 
> /* Rexx */ signal on novalue;  /*
> */
> trace R
> 
> RC = BPXWDYN( 'alloc rtddn(DDX) rtvol(VLX) new delete' ,
>     'dsn('userid()'.TEMP.LMTEST' ,
>     'dsorg(PS) recfm(V,B) lrecl(137) msg(WTP)' )
> 
> address 'ISPEXEC'
> 'LMINIT DATAID(LMID) DDNAME('DDX') ENQ(SHR)'
> say value( 'DDX' ) value( 'VLX' ) value( 'LMID' )
> 
> if RC==0 then do
>     call GetIt
>     'LMOPEN DATAID('LMID') OPTION(OUTPUT)'
>     call PutIt
>     end
> 
> 'LMFREE DATAID('LMID')'
> exit( RC )
> 
> GetIt:
>     address 'TSO'
>     RC = outtrap("line.","*","NOCONCAT")
>     'LISTALC STATUS SYSNAMES'
>     return( RC )
> 
> PutIt:
>     do I = 1 to line.0
>         LL = line.I
>         'LMPUT DATAID('LMID') MODE(INVAR) DATALOC(LL)' ,
>             'DATALEN('length( line.I )')' 'NOBSCAN'
>         trace N
>         end I
>     return( RC )
> /* ************************************* */
> 
> ... runs with output:
> 
>       5 *-* RC = BPXWDYN( 'alloc rtddn(DDX) rtvol(VLX) new delete' ,
> 'dsn('userid()'.TEMP.LMTEST' ,    'dsorg(PS) recfm(V,B) lrec
>  l(137) msg(WTP)' )
> >>>   "0"
>       9 *-* address 'ISPEXEC'
>      10 *-* 'LMINIT DATAID(LMID) DDNAME('DDX') ENQ(SHR)'
> >>>   "LMINIT DATAID(LMID) DDNAME(SYS00048) ENQ(SHR)"
>      11 *-* say value( 'DDX' ) value( 'VLX' ) value( 'LMID' )
> >>>   "SYS00048 WORK02 ISR00023"
>  SYS00048 WORK02 ISR00023
>     ...
> and when I VIEW the content of TEMP.LMTEST, the only DDNAME allocated to
> that data set is the SYS00048 allocated by BPXWDYN.
> 
> -- gil
> 
> ----------------------------------------------------------------------
> 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