Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

File versioning using the FileObject in Java for OpenVMS

SpiroT
Occasional Visitor

File versioning using the FileObject in Java for OpenVMS

I am currently using the FileObject provided by java (v. 1.4.2) to return a list of files in a given directory. Is there a way that I can enable java to retrieve all versions of the file that are currently being stored on OpenVMS? The File object currently returns the most recent version of the file, but I would like to get a list of all versions that are currently out there.

Ex: temp.text (is what I see)
I would like to get:
TEMP.TXT;1
TEMP.TXT;2

I looked through the User Guide: SDK v 1.4.x for OpenVMS and didn't really see anything pertaining to file versioning. Or am I even headed down the correct path? If anyone could provide some direction I would greatly appreciate it. Thank you!
5 REPLIES
Wim Van den Wyngaert
Honored Contributor

Re: File versioning using the FileObject in Java for OpenVMS

Have no idea !

But did you try specifying temp.txt.* ?
(or is it text ?)

Wim
Wim
SpiroT
Occasional Visitor

Re: File versioning using the FileObject in Java for OpenVMS

Sorry, mistype on my part.
Let's say I have the following files in directory TEMPDIR:
TEMP.TXT;1 submitted at 1pm
TEMP.TXT;2 submitted at 2pm

When I use the FileObject provided by java and look in TEMPDIR, the java will return me the most recent version of the file e.g. temp.txt (the 2pm version). But I would like to retrieve both versions of the file. Thanks!
John Travell
Valued Contributor

Re: File versioning using the FileObject in Java for OpenVMS

I would be surprised if it could, remember that java is a cross platform thingy, and very few other platforms understand the concept of file versioning at all, let alone anything like VMS does it.

Are you passing to FileObject any part of the file name ?
As Wim said, could you specify temp.txt;* ?
Or are you parsing the returned file list looking for the file name you want ?
Does this directory hold ONLY those files and no others ?
SpiroT
Occasional Visitor

Re: File versioning using the FileObject in Java for OpenVMS

I guess I could put it a little more plainly. I am creating a multi-platform file browser. The only problem with that is VMS keeps track of file versioning. I am currently using the Java Object for the file browser, but on VMS it is returning the directories and files back in a unix fasion. I guess the answer to your question John is yes, I am passing it in a file name and it would have to be the one that I return from the FileObject. With that being said, are there any good examples of file browsers out there for VMS (that can give me versioned files)? Is there a better route to take than the one I am taking? Any more input would be great. Thanks!
SpiroT
Occasional Visitor

Re: File versioning using the FileObject in Java for OpenVMS

One more thing John, to answer your other questions:
I actually retrieve an absolut path from the FileObject. I can then check to see if that is a directory, and if it is I can turn around and retrieve the directories (file Objects) from that object. And No, no parsing is done, I didn't want to have to do that if I could just retrieve. I imagine it could get pretty messy if I start parsing files accross multiple platforms.

To see what I am talking about check out the Class file (java.io.File) in Java's API.
Thanks again!