Nevermind ... i first figured our how to get it work in CURL as its lot easier and then reengineered my way to sas
options nosource mprint;
%macro test;
filename json_in temp;
data _null_;
file json_in;
put "category=&sourceCountry=&outSR=&f=pjson&addresses={""records"":[{""attributes"":{""OBJECTID"":1,""Address"":""500 NE Multnomah St"",""City"":""Portland"",""State"":""Oregon"",""ZIP_Code"":""97232""}},
{""attributes"":{""OBJECTID"":2,""Address"":""937 E Mariposa St"",""City"":""Portland"",""State"":""CA"",""ZIP_Code"":""91016""}}]}";
run;
%PUT ************* USING CURL ************;
filename test pipe "curl -i -X POST --data ""@%sysfunc(pathname(json_in))"" https://serverHostNm.cloud.xx.org/xxmapsinternal/rest/services/GIS_Tools/USA_Geocoding_Service/GeocodeServer/geocodeAddresses?";
data _null_;
infile test;
input;
put _infile_;
Run;
filename test clear;
%PUT *************USING SAS ************;
filename resp_fl temp;
filename hdrout temp;
proc http url='https://serverHostNm.cloud.xx.org/xxmapsinternal/rest/services/GIS_Tools/USA_Geocoding_Service/GeocodeServer/geocodeAddresses?'
method='POST'
out=resp_fl
/* ct="text/plain;charset=UTF-8" */
in=json_in
headerout=hdrout ;
/*headers 'Content-Type' = 'application/json'*/
;
Run;
data _null_;
infile resp_fl;
input;
put _infile_;
Run;
filename resp_fl clear;
filename hdrout clear;
%mend;
%test;
... View more