×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
I'm going to post here, because I can't tell if this is related to
python-itoolkit in general, or specifically to Litmis Spaces; and
because I know I will catch a few eyeballs here:
It seems to me the single most critical itoolkit feature one would
need to write a Python script that compiles an RPG program is a way to
issue CL commands (such as CRTBNDRPG). Since I still don't really
understand XMLSERVICE or itoolkit, I figured I would not start from
scratch but from an existing example, and the closest thing I found is
the icmd_rtvjoba.py sample program distributed with itoolkit itself.
So, if I navigate my shell to
blah/blah/blah/site-packages/itoolkit/sample and then do
That's two pieces of output. The first is a Python dictionary that I
guess is a dump of the entire XML that is returned, and the second is
just the value corresponding to the 'error' key, which we already got
in the dump.
I noticed Aaron got a similar error when trying to do something
similar in Node.js in May.
Anyway, it clearly looks like there is a CPF4102 happening, and this
is where it really hurts not to be able to have a 5250 session to poke
around on the native side. I can offer practically zero help in
diagnosing this. I don't know if the 'error1' value (3101) means
anything to anyone.
Incidentally, if there were no errors in the returned XML, then the
icmd_rtvjoba.py script would still have problems, because it then goes
on to try to print just the four pieces of information asked for
(USRLIBL, SYSLIBL, CCSID, and OUTQ) and because dictionary keys (and
everything else in Python) is case-sensitive, the lookups would fail.
(This part I know is a python-itoolkit problem, not unique to Litmis
Spaces, and not necessarily a problem with XMLSERVICE or other
implementations of itoolkit.)
I'm a little embarrassed to admit that I don't really have much
experience with formal testing, but Python comes with some pretty
decent testing facilities included, which many packages make use of,
and there is a test directory (sibling of the sample directory) within
itoolkit, so I navigated there and tried
python tests.py
which had a bunch of failures. I also tried the other ones with "test"
in the name individually. test_0020_pgm.py, test_0030_srvpgm.py, and
test_0040_cmd_with_io.py all failed (not very descriptively; they all
expected 'success' in the returned XML and didn't get it).
test_0050_cmd_error.py and test_0060_pgm_error.py seem to officially
have passed, but that also isn't saying much because they were
satisfied to receive any kind of error, not necessarily the errors
that were deliberately aimed for.
On the plus side, even though the attempt to issue RTVJOBA came back
with errors, it also looked like it came back with some live
information as well. Kind of like when your nightly cycle CLP comes
back with an error on the very last line which was merely trying to
write to a log file, but everything else ran fine.
John Y.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.