Listing all dataset in a volume



Support for Java SE, EE & ME, JVM, JNI, JDBC, EJB, JFC, JPDA, JAAS,JCE, JAXP, XML and Java API.

Listing all dataset in a volume

Postby aubi » Wed Jun 10, 2015 11:33 pm

Hello,

Is there a way, how to list all datasets in a volume, including the uncataloged ones?

According to the documentation, it should be ZFile.readDSCBChain, but it works only with complete DS name like
ZFile.readDSCBChain("//'data.set.name'", "volume") -- then it returns Format1DSCB, everything is fine. But I would like to set something like
ZFile.readDSCBChain("*", "volume") to get all datasets on the given volume.

Obviously, I cannot use catalog to find it :-)

Thank you
aubi
aubi
 
Posts: 3
Joined: Wed Jun 10, 2015 11:25 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Listing all dataset in a volume

Postby enrico-sorichetti » Thu Jun 11, 2015 1:00 am

obviously You cannot have what You ask for ...

public class ZFile
extends java.lang.Object
implements ZFileConstants
JNI Wrapper for z/OS C-Library IO routines. An instance of ZFile is a thin wrapper around a C-library file handle and can be used to access MVS datasets using a dataset or DD name.
For more efficient z/OS sequential dataset record read and write, please refer to RecordReader and RecordWriter.

Java native methods in this class simply call their C-library equivalents. Please refer to the following IBM C/C++ publications, which describe how to open MVS datasets and DD names in both record and stream mode.


since there is no C-library function to list a VTOC , then You cannot have what You ask for
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: Listing all dataset in a volume

Postby aubi » Mon Jun 15, 2015 10:58 pm

Thanks a lot, Enrico! You saved me time trying to find the way.

I did the task via our old product and I process its output.

Petr
aubi
 
Posts: 3
Joined: Wed Jun 10, 2015 11:25 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Listing all dataset in a volume

Postby aubi » Mon Jun 15, 2015 11:14 pm

...
aubi
 
Posts: 3
Joined: Wed Jun 10, 2015 11:25 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Listing all dataset in a volume

Postby enrico-sorichetti » Mon Jun 15, 2015 11:26 pm

see

http://www.redbooks.ibm.com/abstracts/s ... .html?Open

it could be a VERY interesting exercise to take the assembler example in appendix c of the above

and translate it to C... METAL C might be better ;)
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times


Return to Mainframe Java

 


  • Related topics
    Replies
    Views
    Last post