I successfully use http_get() to retrieve documents from a web service of up to 4Mb and store them on the IFS using ifs_write(). Unfortunately, some of the documents requested are larger than what RPG allows (~16Mg if I remember).
I was wondering if I can skip over the need for a host variable and combine two functions into a single SQL request?
I've tried a few different variations to no avail. The current version shown here results in the error "SQL0301 Input variable *N or argument 2 not valid":
Is there a way to use two functions and avoid a BLOB host variable?
Thanks in advance for any help.
I was wondering if I can skip over the need for a host variable and combine two functions into a single SQL request?
I've tried a few different variations to no avail. The current version shown here results in the error "SQL0301 Input variable *N or argument 2 not valid":
Code:
exec sql call qsys2.ifs_write( path_name => :llFileName , line => (values( qsys2.http_get_blob( :ggUrl , :ggOptions ) ) ) , overwrite => 'REPLACE');
Thanks in advance for any help.
Comment