My preference in cases like this is to use BPXWDYN instead of ALLOC, that way
you can do something like this (slight variation of Lionel's sample) which
makes BPXWDYN generate the ddnames:
cc=BpxWdyn('alloc da('in_dsn_var') shr rtddn(indd)')
if cc<>0 then exit xmsg('alloc' in_dsn_var rc' cc)+16
cc=BpxWdyn('alloc da('out_dsn_var') shr rtddn(outdd)')
if cc<>0 then exit xmsg('alloc' out_dsn_var rc' cc)+16
Address ISPexec
"lminit dataid(indid) ddname("indd")"
"lminit dataid(outdid) ddname("outdd")"
"lmcopy fromid("indid") todataid("outdid") frommem(a*) replace"
say 'lmcopy rc:' rc
"lmfree dataid("indid")"
"lmfree dataid("outdid")"
cc=BpxWdyn('free dd('indd')')
cc=BpxWdyn('free dd('outdd')')
exit 0
xmsg: say arg(1); return 0
Note, done from the top of my head, but hopefully all quotes etc are ok.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN