from itoolkit import *from itoolkit.lib.ilibcall import *
itool.add(iPgm('my_results',' GETIPADDR') .addParm(iData('JOBNAME','26a','QPADEV000CGROBINSO 123456')) .addParm(iData('IPV4ADDR','15a',' ')))
mypgm_results = itool.dict_out('my_results')print(mypgm_results)
if 'success' in mypgm_results: print('Success!')else: print('Errors occurred.')print('\n')print("Job Name: ", mypgm_results['JOBNAME'])print("IP V4 Address: ", mypgm_results['IPV4ADDR'])print("Status of the program call: ", mypgm_results['success'])
For a *PGM, the parameters are always passed by reference, so I would not expect any difference between calling a CL program or an RPG program.
Glenn, could we see the code for the RPG program where it shows how it gets its parameters?
After that I was able to get your code to run successfully:Job Name: QPADEV000CGROBINSO 123456 IP V4 Address: 126.96.36.199Status of the program call: +++ success GETIPADDRI noticed you're using iLibCall, which calls directly in to XMLSERVICE through PASE APIs. We ran in to issues with this when we moved to 64-bit and XMLSERVICE needed some PTFs. They are listed in the docs - are you missing them? You could also try one of the other transports instead (DatabaseTransport being the next easiest option).Finally, the transport class is deprecated (also iDB2Call and iRestCall) and should use the transports listed here instead, with DirectTransport being the direct replacement for iLibCall.
Regards,Richard SchoenWeb: http://www.richardschoen.netEmail: email@example.com