Is it possible to emulate a sub-set of the basic functionality of Zfiles on the PC?
For purposes for off-line (from the mainframe) development and testing, I was wondering if there was a way of simulating the I/O of VSAM data sets on the pc?
I had considered creating interface(s) to the Zfile class and toggling between the real and PC version using a flag. Any ideas other ideas?
MVS Emulation?
I agree that this might be a nice idea.
You are probably familiar with the FileFactory class, which is used to return platform portable Readers or Writers. Perhaps we could add new factory methods to FileFactory which would return an instance of a new interface for keyed-record files. If you would like to come up with an interface that we could agree on, we would be willing to adapt ZFile as an implementation of that interface. Then, it would be a matter of coming up with a portable implementation of that interface... perhaps there are open source btree implementations that you could adapt.
-- Kirk Wolf jzos.com
(sorry, I wasn't signed in when I posted this)
You are probably familiar with the FileFactory class, which is used to return platform portable Readers or Writers. Perhaps we could add new factory methods to FileFactory which would return an instance of a new interface for keyed-record files. If you would like to come up with an interface that we could agree on, we would be willing to adapt ZFile as an implementation of that interface. Then, it would be a matter of coming up with a portable implementation of that interface... perhaps there are open source btree implementations that you could adapt.
-- Kirk Wolf jzos.com
(sorry, I wasn't signed in when I posted this)
Thanks,
for your response.
Yes, I'm familiar with the FileFactory class. Correct me if I’m wrong, but basically when a new object is initiated from this class, whenever the file name isn’t prefixed with the ‘//’ characters this class simply wraps around standard “java.io.*” classes (without the need of your specialized libraries)?
However, if the C++ I/O wrapper classes are used, are the mark() and reset() methods fully implemented?
As for my keyed record file implementation, I’m adapting to having separated data and indexed (component) files (with the default extensions of .data and .index respectively).
Speaking of VSAM files, I’ve observed that IBM’s JRIO classes first opens the KSDS file and then uses the index as a separate file to locate a record by key. For alternate keys, the alternate index file is used in place of the primary index. As for using Zfiles, how are alternate keys used?
for your response.
Yes, I'm familiar with the FileFactory class. Correct me if I’m wrong, but basically when a new object is initiated from this class, whenever the file name isn’t prefixed with the ‘//’ characters this class simply wraps around standard “java.io.*” classes (without the need of your specialized libraries)?
However, if the C++ I/O wrapper classes are used, are the mark() and reset() methods fully implemented?
As for my keyed record file implementation, I’m adapting to having separated data and indexed (component) files (with the default extensions of .data and .index respectively).
Speaking of VSAM files, I’ve observed that IBM’s JRIO classes first opens the KSDS file and then uses the index as a separate file to locate a record by key. For alternate keys, the alternate index file is used in place of the primary index. As for using Zfiles, how are alternate keys used?
Your description of FileFactory is correct. The current implementation is really designed to allow you to process text files in a platform neutral way. If you have a runtime property that allows you to configure the file or dataset name, you can use this in code that runs on any platform (and can read text-oriented MVS datasets on z/OS).
The current implementation of FileFactory doesn't have any factory methods for keyed files, but as I suggested we could probably add something that returns a platform-specific implementation of some "keyed file" interface type.
ZFile is simply a thin wrapper around the C++ library. If we've not implemented a wrapper for some C I/O function that you need, please let us know. For "positioning", we've implemented wrappers for fgetpos(), fsetpos(), flocate(), seek(), tell(), and rewind(); refer the C/C++ programmer's guide for details.
For the C/C++ library I believe that you just open the AIX catalog name if you want to process a KSDS via an alternate index. Check in the C/C++ programmer's guide, chapter 13 for details on using VSAM with the C/C++ library.
The current implementation of FileFactory doesn't have any factory methods for keyed files, but as I suggested we could probably add something that returns a platform-specific implementation of some "keyed file" interface type.
ZFile is simply a thin wrapper around the C++ library. If we've not implemented a wrapper for some C I/O function that you need, please let us know. For "positioning", we've implemented wrappers for fgetpos(), fsetpos(), flocate(), seek(), tell(), and rewind(); refer the C/C++ programmer's guide for details.
For the C/C++ library I believe that you just open the AIX catalog name if you want to process a KSDS via an alternate index. Check in the C/C++ programmer's guide, chapter 13 for details on using VSAM with the C/C++ library.