Gil you are right, there should be room for a trailing null in the return 
string. In my sample it did not matter as the length of the returned value was 
less than 44. A dump of the returned string shows a x'00' immediately after the 
datasetname.
The manual says 'The keyword must end with a blank or null character', so 
INRTDSN DC AL2(45),C'INRTDSN',XL38'00'   
and
INRTDS2  DC    Y(45),CL45'INRTDSN'    
are both ok.

As to the request, I found that even including a trailing null did not matter, 
so this worked:
INFO1    DC    Y(INFO1L),C'INFO DD(INFOLIB1)',X'00'   
INFO1L   EQU   *-INFO1-2                              
This, however, failed:
INFO1    DC    Y(INFO1L),C'INFO DD(INFOLIB1)',X'FF'   
INFO1L   EQU   *-INFO1-2                              
But with an error code x' FFFFFFE9', not an abend.

The length field of course must match the length of the string.

Willy

On 2017-12-24, at 04:51:16, Willy Jensen wrote:                                 
            
> 
> INFO1    dc    y(info1l),C'INFO DD(INFOLIB1)'                            
> info1l   equ   *-info1-2                                                 
> inrtds1  dc    y(44),cl44'INRTDSN'                                       
> 
> INFO2    dc    C'INFO DD(INFOLIB2)',x'00'                                
> inrtds2  dc    y(44),cl44'INRTDSN'                                       
>  
inrtds2 is not null-delimited as it was in David's example.

According to the Ref. manual, you *always* need a byte for the returned 
trailing null.  Have you inspected the character after the returned DSN or 
tried with a 44-character DSN?

Reply via email to