I want to call proc http and pass in a string to the url which contains a variable like this (and call the macro from a data step): %macro cool (macroCUI=); proc http headerout= hdrout method="GET" out=outXML url= catt( "http://xxx/REST/xxx/", ¯oCUI,"/yyy"); run; %mend cool; data temp; set PIMTable1; execute ('%cool(macroCUI='||cui ||')'); run; However, this will get an error that the url variable is expecting a string. I can create a macro like below, but the timing of the macro within a macro does not work. I will only ever get the last one in the data step. macro cool (macroCUI=); data _null_; length url $ 2048; url = catt( "http://xxxx/REST/xxxx/", ¯oCUI,"YYYY"); url = translate(trim(url), '+', ' '); call symputx('REQUEST_URL', url); run; proc http headerout= hdrout method="GET" out=outXML url= "%superq(REQUEST_URL)"; run; data temp; set PIMTable1; execute ('%cool(macroCUI='||cui ||')'); run; Any suggestions?
... View more