kadler / db2sock-test

1 stars 0 forks source link

Need to trim results in stored proc call (Rexx-specific?) #19

Closed kadler closed 6 years ago

kadler commented 6 years ago

Original report by Jesse G (Bitbucket: ThePrez, GitHub: ThePrez).


In the following test output, I do not expect the "USRLIBL" key in the output to have trailing spaces. I do not believe this happens during HTTP rest calls and may be isolated to invocations via stored proc (I am using DB2JSON.DB2PROCJR) and possibly even Rexx-based calls.

***********************************************
*****RTVJOBA ERROR:
***********
in:
{"script":[{"cmd":{"exec":"CHGLIBL LIBL(DB2JSON QTEMP) CURLIB(DB2JSON)"}},{"cmd":{"rexx":"RTVJOBA USRLIBL(?)"}}]}
********************
output:
{"script":[{"cmd":["CHGLIBL LIBL(DB2JSON QTEMP) CURLIB(DB2JSON)"]},{"cmd":["STRREXPRC SRCMBR(CMDIO) SRCFILE(DB2JSON/QREXSRC) PARM('3 RTVJOBA USRLIBL(?)')",{"records":[{"USRLIBL                                                             ":"DB2JSON    QTEMP"}]}]}]}

****************************************************
kadler commented 6 years ago

Original comment by Jesse G (Bitbucket: ThePrez, GitHub: ThePrez).


Verified. Closing. Thank you!

kadler commented 6 years ago

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


remote ... rexx rtvjoba (laptop db2procjr)

Ok, fix for remote via db2procjr (laptop).

Generally, stored procedure db2procjr path was intended for remote development. Not an async interface. Many CCSID, other problems, slow, etc. Should work, but not tested much by me. Thanks for help.

#!bash

=============================
test5000_sql400json_procjr64 ../json/j0341_cmd_rexx_rtvjoba
=============================
input(5000000):
{"cmd":{"rexx":"RTVJOBA CCSID(?N) USRLIBL(?) SYSLIBL(?)"}}

output(274):
{"script":[{"cmd":["STRREXPRC SRCMBR(CMDIO) SRCFILE(DB2JSON/QREXSRC) PARM('3 RTVJOBA CCSID(?N) USRLIBL(?) SYSLIBL(?)')",
{"records":[{"CCSID":"37"},
{"USRLIBL":"QGPL       QTEMP      QDEVELOP   QBLDSYS    QBLDSYSR"},
{"SYSLIBL":"QSYS       QSYS2      QHLPSYS    QUSRSYS"}]}]}]}

result:
success (0)