Hmm. Good question. I have always used 37, but I'm not sure what others would recommend for UK.
Not sure if you need to change anything in source members unless you plan to pass any special characters through the parameters.
You could always open the source members in RDI and do a save as to a 285 based source file. Not sure if you can convert when doing a CPYSRCF perhaps ?
The PYRUNC CL is really essentially just composing the python command line to run, executing it and returning data via STDOUT. Along with some extra validation.
I would probably do something like the PYPATH command does to pre-set any of your search paths before running the PYRUN command. Then those paths are passed thru from the IBMi job calling the Python app and your special env should get handled.
Or create your own variation of PYPATH that set's the path with ADDENVVAR or export on the QSH command line.
Hope that makes sense.
Regards,
Richard Schoen
Web:
http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx
Phn: (612) 315-1745
----------------------------------------------------------------------
message: 1
date: Wed, 24 Apr 2019 17:27:52 +0100
from: Craig Richards <craig@xxxxxxxxxxxxxxxx>
subject: Re: Python CL Command Wrappers
Hi Richard,
Thanks so much for posting and making your Python CL Wrapper available.
I have a couple of small questions if you have a moment some time.
What would be your CCSID recommendation for someone living in the UK?
Would it make sense to scan your PYONI/SOURCE file and change and CCSID 37s to 285?
( I wouldn't just do a blanket scan and replace... I can see there are few references to "37" which are just text or nothing to do with CCSIDs)
Also, I'm running Python 3.6.8 in a virtual environment at the moment. I used --system-site-packages to point to the yum install to gain access to things like iToolkit which aren't easily installed into a venv (for me at
least...)
Is there a recommended way to use your wrapper with virtual environments?
thanks kindly,
Craig
As an Amazon Associate we earn from qualifying purchases.