Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Previous revision | ||
systools_http [2019/01/07 15:39] |
systools_http [2021/04/19 20:10] (current) mihael |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== SYSTOOLS HTTP SQL Functions ====== | ||
+ | For some time now you can make HTTP requests with SQL via some UDFs. But there are some things to consider when using them. | ||
+ | |||
+ | |||
+ | ===== CCSID ===== | ||
+ | You may encounter a character conversion error when executing your program though the SQL perfectly works in your SQL editor of choice. This is due to some assumptions made by the compiler. | ||
+ | |||
+ | For example it assumes that the host variables are the same CCSID as the job CCSID (in my case no matter how I defined the host variables, even the keyword '' | ||
+ | |||
+ | So when compiling your program you should set the correct CCSID at the job. | ||
+ | |||
+ | CHGJOB CCSID(273) | ||
+ | |||
+ | |||
+ | ===== HTTP Header ===== | ||
+ | |||
+ | The default headers are not always what you want to use so you should define your own. | ||
+ | |||
+ | <sxh sql> | ||
+ | SELECT * FROM (Values( | ||
+ | SYSTOOLS.HTTPGETCLOB( | ||
+ | ' | ||
+ | '< | ||
+ | </ | ||
+ | |||
+ | For VERBOSE functions you can also add " | ||
+ | |||
+ | ===== Resources ===== | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | {{tag> |