Oops, just spotted an error with alc2 in my mail.
But null-delimited string like this works too:

   Link  EP=BPXWDYN,param=alc2,VL=1  
   . . .
alc2     dc    c'alloc dd(mydd2) dsn(WJ.TEST.DS2) shr',x'00'   

-----Oprindelig meddelelse-----
Fra: IBM Mainframe Assembler List [mailto:[email protected]] På 
vegne af Willy Jensen
Sendt: 22. december 2017 18:24
Til: [email protected]
Emne: SV: Calling BPXWDYN to Return DSNAME for DDNAME

Seems that BPXWDYN will accept 2 types of call from ASM:
 
With a length field at the front like.
alc1     dc    y(alc1l),c'alloc dd(mydd1) dsn(WJ.TEST.DS1) shr'  
alc1l    equ   *-alc1-2                                               

Null-delimited like:
alc2     dc    y(alc1l),c'alloc dd(mydd2) dsn(WJ.TEST.DS2) shr',x'00'

both
    Link  EP=BPXWDYN,param=alc1,VL=1  
and
   Link  EP=BPXWDYN,param=alc2,VL=1  
allocates the dataset named.

But for returning a value the version with a length at front must be used like
inrtdsn  dc    y(44),cl44'INRTDSN'

Willy

Reply via email to