我正在尝试访问一个名为 XYZ 的数据集;我的代码是:
ZFile zFile = new ZFile("//X.Y.Z","r");
try {
String enc = ZUtil.getDefaultPlatformEncoding();
InputStream is = zFile.getInputStream();
BufferedReader rdr = new BufferedReader(new InputStreamReader(is, enc));
String line;
while ((line = rdr.readLine()) != null) {
System.out.println(line);
};
}finally {
zFile.close();
}
我得到这个例外:
com.ibm.jzos.ZFileException: X.Y.Z: Filename is not a valid MVS dataset or DD name; errno=99 errno2=0x0 last_op=0 errorCode=0x0
at com.ibm.jzos.ZFile.checkSecurityManager(ZFile.java:1592)
at com.ibm.jzos.ZFile.<init>(ZFile.java:475)
at it.Main.test(MainApp.java:20)
com.ibm.jzos.ZFileException: //'X.Y.Z': fopen() failed; EDC5049I The specified file name could not be located.; errno=49 errno2=0xc00b0641 last_op=50 errorCode=0x21708
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)
at it.Main.test(MainApp.java:22)
有什么建议吗?谢谢。