Sorry, I am not from Rocket Software but I am a fan of their Python releases on z/OS
So as I see it: the efforts to read from files referenced via DD names:
- need to use Python 2.7 which can be installed side by side with Python 3.6
- need to use BPXBATSL because it spawns Python local rather than in a separate jobstep
- BPXBATSL does not expand symbolic variables
Here a test job with some comments added at that time:
//BPX EXEC PGM=BPXBATSL
//SMF DD DISP=SHR,DSN=MM.SMF,DCB=(RECFM=U)
//STDPARM DD *
PGM /u/ada/mm/py27/bin/python
/u/ada/mm/apy/smfreader.py -b dd:SMF
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDENV DD PATH='/u/ada/mm/apy/batsl.env',PATHOPTS=ORDONLY
//
//* Batch Unix Program Spawn Local (BPXBATSL)
//* - allows to pass references to files per DD name
//* and this allows to overwrite DCB parameters, e.g.
//* to access BDW and RDW with DCB=(RECFM=U)
//* which would be skipped when reading a VB blocked file
//*
//* Note: - Environment Variables are not expanded in PARM
//* and in STDENV, but can use symbolic links (ln cmd
//* - STDENV needed to set env (profile not used)
//* - STDPARM overcomes line limitation, parameters
//* may be split over several lines
//* (a parameter in quotes is not supported)
//*
See also Unix System Services Command Reference
Appendix D. Running shell scripts or executable files under
MVS environments
Hope that clarifies things,
MM