It works by excluding the number sign, "#", from the drug name:
73 proc http 74 url="https://rxnav.nlm.nih.gov/REST/approximateTerm.json?term=acetaminophen w/ codeine 3" 75 method= "GET" 76 out=med1; 77 run; NOTE: PROCEDURE HTTP used (Total process time): real time 0.31 seconds cpu time 0.01 seconds NOTE: 200 OK 78 %fileecho(med1); NOTE: The infile MED1 is: Filename=C:\Users\sasbim\AppData\Local\Temp\SAS Temporary Files\_TD15416_d10b742_\#LN00010, RECFM=V,LRECL=32767,File Size (bytes)=576, Last Modified=16Apr2018:13:39:38, Create Time=16Apr2018:13:18:32 {"approximateGroup":{"inputTerm":"acetaminophen w/ codeine 3","comment":"","candidate":[{"rxcui":" 817579","rxaui":"3297609","score":"50","rank":"1"},{"rxcui":"817579","rxaui":"798172","score":"50" ,"rank":"1"},{"rxcui":"817579","rxaui":"798171","score":"50","rank":"1"},{"rxcui":"817579","rxaui" :"3095428","score":"50","rank":"1"},{"rxcui":"817579","rxaui":"3095427","score":"50","rank":"1"},{ "rxcui":"817579","rxaui":"2626344","score":"50","rank":"1"},{"rxcui":"817579","rxaui":"3076140","s core":"50","rank":"1"},{"rxcui":"1945644","rxaui":"798175","score":"50","rank":"1"}]}} NOTE: 1 record was read from the infile MED1. The minimum record length was 576. The maximum record length was 576. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds 79 libname resp1 JSON fileref=med1; NOTE: JSON data is only read once. To read the JSON again, reassign the JSON LIBNAME. NOTE: Libref RESP1 was successfully assigned as follows: Engine: JSON Physical Name: C:\Users\sasbim\AppData\Local\Temp\SAS Temporary Files\_TD15416_d10b742_\#LN00010 80 data Approximategroup_candidate; 81 set resp1.Approximategroup_candidate; 82 run; NOTE: There were 8 observations read from the data set RESP1.APPROXIMATEGROUP_CANDIDATE. NOTE: The data set WORK.APPROXIMATEGROUP_CANDIDATE has 8 observations and 6 variables. NOTE: DATA statement used (Total process time): real time 0.03 seconds cpu time 0.00 seconds
... View more