On 3/10/22 07:18, Farley, Peter x23353 wrote:
Where, for instance, in the documentation that you linked to is there information on
whether the python "open()" function for files will or will not support direct
access to MVS datasets without transferring them down to the Unix file system? I.E.,
are either of these calls to the open() function valid or not:
Myfile = open("//'MVS.DATA.SET.NAME", "rt", ccsid="1047")
Myfile = open("//:DDNAME", "rt", ccsid="1047") # This of course assumes that a call to
"bpxunix" (or by other means) has been used to establish a DD allocation in the AS where the python program
is executing
This will *never* happen. If you read the doc WRT tagging behaviors you
will understand why
https://www.ibm.com/docs/en/python-zos/3.9?topic=translation-tagging-behaviors.
Rocket's Python port supported reading MVS data sets but it was not a
documented feature and was used with great care. Patching the Python
core I/O libraries to support MVS data sets is not a great idea. It's
much better to write a specific library that *only* support MVS data
sets and not z/OS UNIX files. A good reference implementation is the
JZOS ZFile class. If you open an RFE IBM may do this. Or maybe the
community can contribute? Either way it's going to be implemented as a
specific package.
Porting tools to support MVS data sets in trivial. They use open()
because it's a low-level API and read/write support sockets, FIFO's,
pipes etc. It's not just a case of replacing open with fopen(). Python
implements a fdopen()
https://docs.python.org/3/library/os.html#os.fdopen method for wrapping
file descriptors.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN