By "enhanced ASCII" do you mean ISO-8859-1? UTF-8? "E. None of the above."?
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [[email protected]] on behalf of David Crayford [[email protected]] Sent: Monday, September 26, 2022 6:41 PM To: [email protected] Subject: Re: IBM python documentation? On 27/9/22 00:34, Farley, Peter x23353 wrote: > Thanks for the reminder about the zoautil_py functions, I did know about them > but there are gaps -- e.g. ZOAU has no direct support for simple sequential > processing of VSAM files (e.g., to download a copy of VSAM data to a flat > file in the Unix Services environment for analysis there). I have used a > Rexx script that executes the FileManager batch utility program FMNMAIN to > perform such functions. The FileManager batch program proved to be the most > compatible in generating correct Unix Services output files for various > flavors of VSAM input files where IDCAMS REPRO or DFSORT "OPTION COPY" > outputs were less so. > > Re: "ADDRESS TSO" needs - Rexx is not necessarily needed, as there is also > the Unix Services command "tso" (or "tsocmd" for authorized services) to > execute a single TSO command. The python subprocess.run() function could > handle executing that command and capturing the output as needed. > > For more complicated "ADDRESS TSO" needs, yes one can execute a Rexx script > in the Unix Services environment which uses "ADDRESS TSO" to execute a Rexx > script also stored in that environment (or in an MVS library assigned to > SYSEXEC) that then actually uses "ADDRESS TSO" functions. A bit Rube > Goldberg, but it does work, as my recent experimentation with getting LISTDSI > output from the Unix Services environment proved. Conceivably one could > write that first Rexx script to set up an ISPF environment (all the needed > DD's, etc.) and execute the second (functional) script in an ISPF environment > (I haven't tried that yet; here there be dragons). Should have used my lua port :) It supports all access methods and has a listdsi function that I wrote - io.listdsi(dsname) > Re: Writing an MVS I/O package for IBM python - ISTM that without > documentation of the runtime architecture of the IBM python port (and also > possibly access to the source of the port) it is not likely to succeed. OCO > strikes again. It's certainly not OCO. IBM ship all the header files to write extensions including a zos.h. What you need to know is that it's 64-bit, enhanced ASCII and is compiled using the xlclang compiler. Extensions are shared objects so you need to following compiler options: -q64 -qascii -qexportall. You may not need "exportall" if IBM have defined PyMODINIT_FUNC for the platform. > > The new DSFS functionality may or may not relieve the need for an > MVS-specific I/O package. That remains to be seen. > > Peter > > -----Original Message----- > From: IBM Mainframe Discussion List <[email protected]> On Behalf Of > Matt Hogstrom > Sent: Monday, September 26, 2022 8:28 AM > To: [email protected] > Subject: Re: IBM python documentation? > > If IIRC IBM loosely paired the IBM ZOAU to “assist Python”. > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.ibm.com%2Fcommunity%2Fuser%2Fibmz-and-linuxone%2Fblogs%2Faustin-wells1%2F2020%2F12%2F11%2Fusing-ibm-open-enterprise-python-for-zos-and-zoau&data=05%7C01%7Csmetz3%40gmu.edu%7Ccfa1d3f0cb6144907fa608daa0104277%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C637998288955467761%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=CSIi3EDh0%2Bl60cgC%2B2ZSh6zbr6omoi4FwR125vs76UE%3D&reserved=0 > > The challenge I see currently with Python is that is runs in a USS > environment so if you need to “ADDRESS TSO” you need to call a REXX from > Python in USS and do the other work. Its probably not going to happen but a > “System” Python might fill that gap. > > Matt Hogstrom > [email protected] > > “It may be cognitive, but, it ain’t intuitive." > — Hogstrom > >> On Sep 25, 2022, at 11:15 PM, David Crayford <[email protected]> wrote: >> >> On 26/9/22 10:43, Charles Mills wrote: >>>> It's trivial to write an MVS I/O package if you have a C compiler. >>> One might ask then why IBM has not done so. >> I would suggest that they have not had a requirement. IBM use Python in >> their analytics products and for new stuff like Ansible. Same with golang, >> they need it for Kubernetes and OpenShift for z/CX containers. I doubt very >> much if many customers have tried golang. It's a great language now it >> supports generics. As fast as C++ with many advantages. >> >> >>> Charles >>> >>> -----Original Message----- >>> From: IBM Mainframe Discussion List [mailto:[email protected]] >>> On Behalf Of David Crayford >>> Sent: Sunday, September 25, 2022 6:57 PM >>> To: [email protected] >>> Subject: Re: IBM python documentation? >>> >>> On 26/9/22 07:34, Farley, Peter x23353 wrote: >>>> I know Rocket's port of python has some documented enhancements to support >>>> MVS dataset access among other things, but I have failed to find any >>>> documentation on the IBM websites for an IBM-produced "python Programmers >>>> Guide" (or similar) that would describe and provide examples for any >>>> "IBM-specific" functional enhancements to the base language facilities. >>>> >>>> Is there any such documentation? Or are the python.org >>>> documentation websites the only reference material available for the >>>> IBM port of python? (i.e., no functional enhancements at all are >>>> provided in the IBM port) >>> Correct! It's trivial to write an MVS I/O package if you have a C compiler. > -- > > This message and any attachments are intended only for the use of the > addressee and may contain information that is privileged and confidential. If > the reader of the message is not the intended recipient or an authorized > representative of the intended recipient, you are hereby notified that any > dissemination of this communication is strictly prohibited. If you have > received this communication in error, please notify us immediately by e-mail > and delete the message and any attachments from your system. > > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
