Programming Languages on Power

Power Programming Languages

IBM Power, including the AIX, IBM i, and Linux operating systems, support a wide range of programming languages, catering to both traditional enterprise applications and modern development needs.


#Power

 View Only
  • 1.  DB2 SQL HTTP_GET/POST

    Posted 7 hours ago

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


  • 2.  RE: DB2 SQL HTTP_GET/POST

    Posted 5 hours ago

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