%let host= rest.xyz.com;
%let uri=/abc/def;
%let date = %sysfunc(datetime(),e8601dt24.3)Z;
%let status = status==1001;
%let everything=https://&host.&uri./?filters=expecteddel<&date.%str(;)&status;
%put "&everything";
Log:
69 %let host= rest.xyz.com; 70 %let uri=/abc/def; 71 %let date = %sysfunc(datetime(),e8601dt24.3)Z; 72 %let status = status==1001; 73 74 %let everything=https://&host.&uri./?filters=expecteddel<&date.%str(;)&status; 75 76 %put "&everything"; "https://rest.xyz.com/abc/def/?filters=expecteddel<2021-11-18T09:07:54.382Z;status==1001"
As you can see from the log that I posted, the code works (tested on SAS On Demand, so no special setup).
Post your complete log of these macro statements as you ran them.
You misspelled the format in the %SYSFUNC; it should be e8601, not e8061.
Support the SASWare Ballot Idea I just posted 🙂
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.