Looks like you never got any replies, perhaps this assembler subroutine will be useful.<br><br>DSNAME TITLE '- get dataset name'<br> PRINT GEN<br>*<br>* Given a ddname, get the dsn from the JFCB<br>*<br> EJECT<br>**********************************************************************<br>* main control - handles linkage conventions, parameters, internal<br>* subroutines and return.<br>* r0 r1 r2 r3<br>* r4 r5 r6 r7<br>* r8 r9 r10 r11 parm<br>* r12 base reg r13 save addr r14 r15<br>*<br>DSNAME CSECT<br> STM R14,R12,12(R13) save registers<br> LR R12,R15 establish the<br> USING DSNAME,R12 base register<br> ST R13,SAVEAREA+4 save ptr to caller's savearea<br> LR R15,R13 get it to work with<br> LA R13,SAVEAREA point to new savearea<br> ST R13,8(R15) chain new to old savearea<br>*<br> L R11,0(R1) get addr ddname parm<br> LA R1,CHKDCB address dcb<br> USING IHADCB,R1 base dcb dsect<br> MVC DCBDDNAM,0(R11) load ddname<br> DROP R1 drop dcb dsect<br>*<br> OPEN (CHKDCB,INPUT) 00022<br> RDJFCB CHKDCB 00023<br> CLOSE CHKDCB 00022<br>*<br> L R13,4(R13) restore prev savearea address<br> LM R14,R12,12(R13) restore saved registers<br> XR R15,R15 clear return code<br> BSM R0,R14 return<br>*<br> EJECT<br>**********************************************************************<br>* data areas<br>*<br> YREGS register equates<br>*<br> LTORG literal pool<br>*<br>DBLWD DS D<br>SAVEAREA DS 18F<br>CHKDCB DCB DSORG=PS, +<br> MACRF=GL, +<br> EXLST=EXLST<br>*<br>EXLST DC 0F'0',AL1(X'80'+X'07'),AL3(JFCBLK)<br>*<br>JFCBLK DC 256X'00'<br>*<br> DCBD DSORG=PS,DEVD=DA<br>*<br> END DSNAME<br>