Hi Drew, What is your session CCSID? You can have this kind of mismatch between United Kingdom CCSID 1146 (session) and USA CCSID 037 (job): A2 for CCSID 1146 = $ A2 for CCSID 0037 = ¢ Thanks. Best Regards Wim From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
On Behalf Of Frank Broome Note that if you want to hardcode a value with “special” characters in a source file then you will get issues if the job that eventually runs the program is running in a different CCSID than the source file is. Either you store your special characters in a file with CCSID (not 65535) or you have to ensure that the CCSID of the source matches the job CCSID that runs the program. Best regards, Frank From:
ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
On Behalf Of Diarmuid Drew I’ve tried that with a few lines of code, URL = "" +'/'+ %trimr(apiVersion) +'/'+ %trimr(mailResc) + '?';
URL = "" + http_urlEncode('$select');
URL = "" + http_urlEncode('&$filter');
clear response;
response = http_string('GET'
: URL
: *omit
: *omit);
And I get the following in the debug log GET /v1.0/me/messages?%A2select%26%A2filter HTTP/1.1
Host:
graph.microsoft.com User-Agent: http-api/1.39 The $ sign is still converted to a %A2 From:
ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
On Behalf Of Frank Broome Hi, I believe you need to put message in a variable, e.g. ‘variable’ and use pParm1 = http_urlEncode(variable) URL = ''
+ pParm1; Also note that if you hardcode a value it will get the CCSID of the source and if you then run it in a job with different CCSID the runtime value will change, potentially. Best regards, Frank From:
ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
On Behalf Of Diarmuid Drew Hi, I’m new to HTTPAPI and sure that this has been asked a few times but my mailing list searches have not provided an answer, possibly my powers are weak. I’m trying to consume a RESTful service and my selection is not working, I get a response
from the server but it is not filtering as I requested, ie it is responding with all emails and all fields. The URL I’m accessing is https://graph.microsoft.com/v1.0/me/messages?$select=sender,subject&$filter=importance
eq 'high' but in the debug log it is showing GET /v1.0/me/messages?¢select=sender,subject&¢filter=importance%20eq%20'high' HTTP/1.1 The dollar characters are being shown as ¢ (cent) The debug file is CCSID 819 and my job is 37, looking at the debug log in hex it shows - - - - + - - - - * - - - - + - - - - * ----+----*----+----* 65733FA2 73656C65 63743D73 656E6465 722C7375 es?$select=sender,su The dollar is showing as A2 which is the cent sign in the extended ASCII table. My code looks like this (CCSID 37 source file) D URL S 300a varying D response S 100000a varying URL = ''
+ '$select=sender,subject&' +
'$filter=importance eq ''high'''; http_xproc(HTTP_Point_Addl_Header:%paddr(add_hdr)); monitor;
response = http_string('GET'
: URL
: *omit
: *omit);
on-error;
errorMsg = http_error();
sndmsg(errorMsg); endmon; What should I do to get the correct this? Thanks Disclaimer The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it.
If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful. Disclaimer The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it.
If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful. |
-- _______________________________________________ Ftpapi mailing list Ftpapi@xxxxxxxxxxxxxxxxxxxxxx http://scottklement.com/mailman/listinfo/ftpapi