- edited description
Improve irow handling for 5250 output parameters
Issue #3
resolved
Retrieving output parameters is somewhat painful:
itool.add(iCmd('rtvjoba', 'RTVJOBA USRLIBL(?) SYSLIBL(?) CCSID(?N) OUTQ(?)'))
itool.call(itransport)
rtvjoba = itool.dict_out('rtvjoba')
if 'success' in rtvjoba:
print(rtvjoba['row'][0]['USRLIBL'])
print(rtvjoba['row'][1]['SYSLIBL'])
print(rtvjoba['row'][2]['CCSID'])
print(rtvjoba['row'][3]['OUTQ'])
you can fix it...
itool = iToolKit(irow=0)
itool.add(iCmd('rtvjoba', 'RTVJOBA USRLIBL(?) SYSLIBL(?) CCSID(?N) OUTQ(?)'))
itool.call(itransport)
rtvjoba = itool.dict_out('rtvjoba')
if 'success' in rtvjoba:
print(rtvjoba['USRLIBL'])
print(rtvjoba['SYSLIBL'])
print(rtvjoba['CCSID'])
print(rtvjoba['OUTQ'])
... but because irow is specified on the toolkit object instead of the iCmd object, it will break anything which actually returns rows. Should make it available on iCmd object (and make irow=0 the default for output parameters in the iCmd object).
Comments (5)
-
reporter -
Account Deleted This is a low priority, but will be considered in future release.
-
Account Deleted - changed status to on hold
status
-
reporter - changed status to open
-
reporter - changed status to resolved
Migrated to https://github.com/IBM/python-itoolkit/issues/3
- Log in to comment