If sourceDSN is a valid ESDS or KSDS file, it works fine. If it is RRDS I get:

Exception in thread "main" com.ibm.jzos.ZFileException: //DD:SYS00010: fopen() failed; EDC5041I An error was detected at the system l
evel when opening a file.; errno=41 errno2=0xc00a0022 last_op=100 errorCode=0x800a0
at com.ibm.jzos.ZFile.fopen(Native Method)
at com.ibm.jzos.ZFile.doZFileOpen(ZFile.java:613)
at com.ibm.jzos.ZFile.<init>(ZFile.java:476)

Your post did not include the ZFile constructor, so I can't see what options you used.
The failure you are getting is in the C/C++ library fopen() routine. The manuals will help you figure out what the error is.

I could not find any of those error codes in the IBM docs.
errno=41 is just Fopen() failed as we see in the message.
errno2=0xc00a0022
In the IBM docs for errno2,
(http://www-01.ibm.com/support/knowledge ... llerr2.htm)
I see errors of:
.
.
C0090030
C00B0001
C00B0002
.
.

Skips over C00A0022

I'll keep looking for it elsewhere, but that is where I have looked so far.

Your exception is occurring in the ZFile fopen() method, which is invoked by the ZFile constructor.
What arguments are you passing to the constructor?
Have you looked at the RRDS example in the "z/OS C/C++ Programming guide" ?

I can't say why errno2=0xc00a0022 is not documented by IBM - you would have to ask them

The best reference is "z/OS C/C++ Programming Guide" - Ch 18: Debugging I/O Programs.
In there, you are directed to look at last_op. 100 is "__VSAM_OPEN_FAIL" .
The errorCode=0x800a0 is the amrc __feedback structure. (__rc=8, __fdbk=A0).