Hi,
the issue in 3.6.1 shown below for opening a z/OS file, I see some discussion from couple of years back in the forum that says the functionality should be coming, not sure why it even dropped between 2.7 and 3.6. Does anyone know if opening a z/OS dataset is possible yet in 3.6.1?
EDC5129I No such file or directory.: "//MY.PDS(TEXT)'"
using:
f= open("//'MY.PDS(TEXT)'",'rb')
regards
Steve
------------------------------
Stephen McAuliffe
Systems Engineer
Bank of America
Bromley United Kingdom
------------------------------
Hi Stephen,
Unfortunately, Python 3.6.1 doesn't support the work with MVS datasets, but the MVS access was restored for Python 3.7.0 included in Miniconda base bundle.
Usually, the datasets are expected to contain EBCDIC-encoded text. Python 3.7's default encoding for files is UTF-8. When opening a data set, it's recommended to specify encoding as shown below, unless the data set contains UTF-8 or pure 7-bit ASCII:
f=open("//'MY.DATA.SET'", "r", encoding="IBM1047")
In Python 3.7, the extra keywords supported by C function fopen() can also be used in the same parameter as "r" or "w", like "rb,type=record".
Miniconda can be download from Rocket Community portal. Please check the following threads for more info:
Introducing z/OS conda for download and deployment of z/OS open source products
How to install z/OS Miniconda - the first step in using Open Source on z
If you want to do something more than just data sets, or something peculiar, take a look at IBM's ZOA Utilities.
Thanks,
Sergey
------------------------------
Sergey Rezepin
Rocket Software
------------------------------