Hello,
I'm trying to retrieve the content of a data area with the QWCRDTAA API. It's meant to contain a http proxy URI string for non-PASE applications. I've created it like this:
crtdtaara dtaara(qusrsys/httpproxy) type(*char) len(32) value('
http://leela.pocnet.net:3128') aut(*use)
This is the documentation I was using:
https://www.ibm.com/docs/en/i/7.4.0?topic=ssw_ibm_i_74/apis/qwcrdtaa.html
I'm compiling it with the defaults. PDM option 14, plus output(*print) dbgview(*all).
When running the program in question, I'm getting back garbage, such as:
*receiver:c 50 = ' à *CHAR QUSRSYS Ø Ô¼·u´ ø~ '
00000 00000044 00000020 5CC3C8C1 D9404040 - ...à....*CHAR
00010 4040D8E4 E2D9E2E8 E2404040 00000020 - QUSRSYS ....
00020 80000000 00000000 EBB7B3A4 BE001070 - Ø.......Ô¼·u´..ø
00030 A100.... ........ ........ ........ - ß...............
This changes between program calls.
error_code.ec_fields.Exception_Id and error_code.exceptiondata is just blanks.
I understand that the receiver variable (expected to be a string) is really a struct. So, part of the result I'm getting back looks actually valid. But I fail to understand why the proxy URL isn't copied into the receiver variable.
Help and hints are very appreciated!
You can find the actual code I'm trying here:
https://leela.pocnet.net/~poc/getproxy.c
Besides the data area shown at this message's top, there is no external dependency.
Note there is a lot of unused/commented code, and functions not being finally carved out, yet. Also, there might be off-by-one errors in field lengths for the additional terminating zero byte. Will fix that when I eventually see the proxy URI in the debugger.
:wq! PoC
As an Amazon Associate we earn from qualifying purchases.