Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve irow handling for 5250 output parameters #3

Open
kadler opened this issue Jun 14, 2016 · 2 comments
Open

Improve irow handling for 5250 output parameters #3

kadler opened this issue Jun 14, 2016 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@kadler
Copy link
Member

kadler commented Jun 14, 2016

Original report by Kevin Adler (Bitbucket: kadler, GitHub: kadler).


Retrieving output parameters is somewhat painful:

#!python

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...

#!python

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).

@kadler
Copy link
Member Author

kadler commented Aug 18, 2016

Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).


This is a low priority, but will be considered in future release.

@kadler
Copy link
Member Author

kadler commented Aug 18, 2016

Original comment by Tony Cairns (Bitbucket: rangercairns, GitHub: rangercairns).


status

@kadler kadler added major enhancement New feature or request and removed major labels Dec 21, 2018
@kadler kadler added this to the 1.8 milestone May 1, 2020
@kadler kadler modified the milestones: 1.8, 2.0 May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant