Reputation: 47
I am using the IBM JZOS API to access PDS members and now I need some information about the members. There is the class PdsDirectory.MemberInfo.Statistics, so that I can create a PdsDirectory, iterate over it and get the Statistics of each member (e.g. modification date, last editing user,...) like so:
PdsDirectory dir = new PdsDirectory(args[0]);
for (Iterator iter = dir.iterator(); iter.hasNext(); ) {
PdsDirectory.MemberInfo info = (PdsDirectory.MemberInfo)iter.next();
System.out.println(info);
}
But I need those statistics only for one single file. Is there a way with
ZFile zFile = new ZFile("//DD:INPUT", "rb,type=record,noseek");
or creating a reader, to access those information? Or is the only way to create the directory and find the file I need?
Upvotes: 1
Views: 945
Reputation: 571
The only information you can get for a data set is from the catalog. You can use the JZOS CatalogSearch class to do that from Java. There is a sample on github.
PDS member statistics are usually only present if you edit members using ISPF. ISPF stores statistics in the PDS directory user data field. Any application can use this field for whatever they like but it's usually only used by ISPF. There are no such statistics in the catalog. There is no last edited userid or record count etc. There is creation data, last referenced date and lots of other useful metadata. You may not find what you are looking for but most of the interesting stuff is in the Format 1 DSCB.
Upvotes: 2