I just tried the FTP client and works fine with MVS data sets and z/Os UNIX files https://docs.python.org/3/library/ftplib.html.
On Wed, Jul 3, 2024 at 2:14 PM David Crayford <dcrayf...@gmail.com> wrote: > > > On 29 Jun 2024, at 9:03 PM, Steve Horein < > 000005b0b4f1358b-dmarc-requ...@listserv.ua.edu> wrote: > > I don't mind flaunting my ignorance, but does python on z provide access to > other functions and programs? > In other words, what are the python equivalents for things like: > attach > attchmvs > attchpgm > bcpii > bpxwunix > call > dsnrexx > ftpapi > irrxutil > link > linkmvs > linkpgm > <others?> > > > There are equivalents to almost all of those listed above. As Timothy > already mentioned ZAOU has many functions including calling MVS programs > which covers all the ATTACH/LINK stuff. For BCPII there is a REST API which > has more function then the REXX so you can just call that. Calling REST > using the Python requests package is trivial and decoding JSON is one line > of code. You can easily wrap a REST API into a Python library, see the Zowe > SDK for Python that has classes for submitting jobs, processing output, > console commands etc https://github.com/zowe/zowe-client-python-sdk. ZAOU > also has classes for this. Obviously, bpxwunix isn’t required because you > can just use the Python runtime to run a subprocess. For dsnrexx there is > ibm_db Python package https://github.com/ibmdb/python-ibmdb. This is > actually part of the IBM DB2 Connect but is open source and free to use. > For FTP that’s covered by the Python standard library, although it may need > work for MVS data sets. For irrxutil there is pyRACF from IBM > https://github.com/ambitus/pyracf. > > Shameless plug: > > While ZAOU has classes for MVS data set I/O they’re lacking for VSAM and > still need a lot of work for processing large data sets one record at a > time. My pyzfile package handles all types of data sets, including VSAM > which REXX does not https://github.com/daveyc/pyzfile. > > For chasing control blocks I have written another library with support for > memory snooping > https://github.com/daveyc/pyzutil/blob/master/examples/cpuid.py which is > much cleaner then the usual intractable nested c2d(c2x(storage))) functions > calls using REXX. > > Is there a python/rexx mapping (official or otherwise) similar to JES2/JES3 > command mapping? > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN