Comments (4)
The problem with the third one is the ?
in the command string causing iCmd
to think it's an output parameter. As a workaround, you can specify the execution mode:
# Two apostrophes - fail
itool.add(iCmd('cmd', "SNDMSG MSG('Howdy, y''all! How ''bout another aposterfee?') TOUSR(jyeung)", {'exec': 'cmd'}))
from python-itoolkit.
Interesting. So getting parameters back requires something called 'rexx' mode. Are there any other situations where one might want 'rexx' instead of 'cmd'? And I guess if your suggestion is to use 'cmd' mode, there isn't a way to escape question marks in case one needs both a literal question mark and an output parameter?
from python-itoolkit.
The only way to dynamically call a CL command with output parameters is to call it via REXX. AFAIK, it's much slower than calling directly, so I would suggest never to use it unless needed.
XMLSERVICE generates a REXX procedure on the fly, calls it, and parses its output. It's not very smart about it, so I suspect that any ?
is interpreted as an output parameter. I could be wrong, though - it's hard to decipher this mess. FYI, Tony considered calling CL commands with output parameters a hack and something you should never do in production.
from python-itoolkit.
Well, fortunately, it's a rare CL command indeed which would require the ability to accept literal question marks as well as output parameters. Of course it would still be nice to have, but it's very low on my wish list. Closing.
If someone stumbling across this does happen to know a way to specify a literal question mark in 'rexx' mode, by all means, post a comment!
from python-itoolkit.
Related Issues (20)
- Drop Python 3.4 Support HOT 4
- _direct.py needs more test coverage
- Add type declarations HOT 17
- Transports need a way to indicate failure HOT 1
- Deprecate the trace functions for standard logging
- Run cl command to create a library in an IASP via DirectTransport on a French system failed HOT 1
- On Japanese or French systems run command via DatabaseTransport fails with ibm_db_dbi::Error HOT 3
- Provide a close() API to close database connections
- PyPI page is outdated HOT 5
- Is there a problem with the Japanese environment in iCmd5250 xml output? HOT 3
- What itoolkit version allows qtemp schema table access using iSqlQuery? HOT 6
- Improve README links on PyPI HOT 3
- RTVJOBA example works only with CCSID=37 HOT 3
- Errors using JayDeBeApi HOT 8
- DatabaseTransport should not close a connection HOT 14
- Stderr handling in SSH Transport can yield wrong results
- Running itool.call ends the program and does nothing HOT 7
- XML Special Character errors/handling HOT 1
- Fix license headers on source files HOT 2
- Error calling Receive DataQ API - QRCVDTAQ HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-itoolkit.