Oh I can really relate ... sitting here on day 2 working on a new API that our web guys created - and really getting more grey hair every other hour. The EBCDIC vs. UTF8 thing can be frustrating - but it gets really frustrating if you have to deal with BLOBs that should be sent or received over the web.
But the SQL functions are cool - I haven't touched any RPG code so far, and have about 90% running. Moving this into SQLRPGLE will be really easy - but first it has to run for 100%.
I try to blog regularly about things like the UPS API that you got running - but I don't have an UPS account. So would you mind, if "we" (I can do that) put your code (of course without account/tokens/etc) into a blog post? So that others might not have such a hard time to get it running?
If you want to- just send mit a PM - maybe with your code (but please remove personal data) - and I would write up some additional text.
Regards,
Daniel
Original Message:
Sent: 4/28/2026 9:40:00 AM
From: Doug Freeman
Subject: RE: DB2 SQL HTTP_GET/POST
Hi Daniel,
Thank you for responding. You were correct about the frustration. But I finally got the QSYS2.HTTP_POST to work in a SQLRPGLE.
------------------------------
Doug Freeman
------------------------------
Original Message:
Sent: Wed April 15, 2026 03:09 PM
From: Daniel Gross
Subject: DB2 SQL HTTP_GET/POST
I don't have a ready made solution for you, but maybe some tips.
First - it will not be easy. IBM i is an EBCDIC system, and the rest of the world is "speaking" UTF-8. RPGLE is awesome with UTF-8, but using embedded SQL with UTF-8 back and forth between is not for the faint of heart. Be ready to have some frustrating moments.
Start with a tool like Postman to explore the APIs of FedEx and UPS - especially the methods GET or POST - if you have your requests ready in Postman, it shouldn't be so hard, to recreate those requests with SQL.
The next step is, to try those requests with embedded SQL in RPGLE.
If your frustration is getting to hard, contact me - I can try to help.
Regards,
Daniel
------------------------------
Daniel Gross
#IBMChampion
Senior Core Developer, Geis Group
Pegnitz, Germany
https://blog.qpgmr.de/
Original Message:
Sent: Wed April 15, 2026 12:55 PM
From: Doug Freeman
Subject: DB2 SQL HTTP_GET/POST
Does anyone have a SQLRPGLE program which is accessing FedEx or UPS using QSYS2.HTTP_ that they would be willing to share with me or by posting? I need to retrieve an authorization token from FedEx and UPS and I'm not sure if I should be using the QSYS2.HTTP_GET or the QSYS2.HTTP_POST. I've been trying and failing with UPS using both GET and POST. I will also need to do the same with FedEx in the future. Any help would be appreciated. Thanks.
------------------------------
Doug Freeman
------------------------------