Following are some of the frequently asked questions about GETURI. When reporting problems, please send them via email stating the problem. Let me know what version of GETURI you are using. See the main FAQ for instructions on finding the version you currently have installed.
Is there an API interface to GETURI that I can use to return data to my program instead of reading data from a physical file or stream file?
Yes, with v3.00b of GETURI I have added an API interface. See the GETURI documentation for more information on use of this API interface.
I'm using GETURI with SSL and receiving and error code. What does the error code mean?
You can find descriptions of the return codes (RC) by following the instructions listed on this site. The text for the error number (errono) is listed in the message returned by GETURI. In the document listed the error number returned will be listed as a negative number. For example, if the return code is 24, you'll want to look up the value -24 on the site. (The GSK errors listed on this page are not applicable).
What licensed program do I need installed for SSL to work with GETURI?
You'll need to make sure you have cryptographic support installed. This is a free product from IBM. Contact your IBM Business Partner and they should be able to get it to you. Here are the Licensed Program details:
5722AC3 Crypto Access Provider 128-bit for AS/400
I'm receiving the error "Error performing SSL handshake. There is no error. RC(23) errno()." How can I fix this?
This error is saying that you don't have the proper Certificate Authority(ies) (CAs) installed on your machine in order to communicate over SSL with the web service you are using. You'll need to install the CAs requred for this.
This page will provide instructions on how this is done.
I'm making a GETURI request that uses SSL and receiving an authority error like "Error during initializing SSL. Permission Denied. RC(10) errno(3401)" or "Error initializing SSL Environment. RC(6003) Access to the key database is not allowed". What do I need to do to fix this?
This is because the user that is making the request does not have the proper authorities to the SSL keyring files and/or directory that are located in the IFS. The keyring files (on most systems) can be found by using the following command:
Normally running the following commands will fix this issue:
CHGAUT OBJ('/QIBM/UserData/ICSS/Cert/Server') USER(*PUBLIC) DTAAUT(*RX)
CHGAUT OBJ('/QIBM/UserData/ICSS/Cert/Server/*') USER(*PUBLIC) DTAAUT(*R)
Do you have an example of using GETURI?
The easiest example is simply retrieving data from a web page. Using the following command you can retrieve the web page for Yahoo.com:
The next example is an example of doing a currency conversion and passing data to the web page:
GETURI URI('http://free.currencyconverterapi.com/api/v3/convert') DATA('q=USD_CAD&compact=y')
The next example is used to POST data to a web service. For example, this could be used when posting XML or a SOAP envelope to a web service. The data in italics should be replaced with the proper information for your web service call:
GETURI URI('server/path') OUTPUT(*STMF) STMF('/path/to/output.ext') DATA(* STMF) DSTMF('/path/to/input.ext') METHOD(*POST)