<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I construct a url from input? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-construct-a-url-from-input/m-p/266100#M269300</link>
    <description>&lt;P&gt;The %put statment prints the appropriate url, but when this is passed into a filename statement the same error occurs. It does look like more efficient code.&lt;/P&gt;</description>
    <pubDate>Mon, 25 Apr 2016 16:48:50 GMT</pubDate>
    <dc:creator>ajffja</dc:creator>
    <dc:date>2016-04-25T16:48:50Z</dc:date>
    <item>
      <title>How do I construct a url from input?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-construct-a-url-from-input/m-p/266095#M269297</link>
      <description>&lt;P&gt;I'm trying to build a url from user generated input(to access different information using the same code), but I'm having an interesting error with the string I build. The error is the same whether I use cats(args) or compress(args). When I hard-code the url it works perfectly. I'm using SAS 9.3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my code snippet:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; nptyr1 = "2012";&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; nptyr2 = "2013";&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; nptqtr1 = "1";&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; nptqtr2 = "1";&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; indstry = "10";&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; Temp0;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;y1 = &amp;amp;nptyr1;&lt;/P&gt;&lt;P&gt;q1 = &amp;amp;nptqtr1;&lt;/P&gt;&lt;P&gt;y2 = &amp;amp;nptyr2;&lt;/P&gt;&lt;P&gt;q2 = &amp;amp;nptqtr2;&lt;/P&gt;&lt;P&gt;nn = &amp;amp;indstry;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;y3 = compress(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"&lt;A href="http://www.bls.gov/cew/data/api/&amp;quot;" target="_blank"&gt;http://www.bls.gov/cew/data/api/"&lt;/A&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;||y1||&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"/"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;||q1||&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"/industry/"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;||nn||&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;".csv"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;call&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'z1'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;, y5);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;y4 = compress(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"&lt;A href="http://www.bls.gov/cew/data/api/&amp;quot;" target="_blank"&gt;http://www.bls.gov/cew/data/api/"&lt;/A&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;||y2||&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"/"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;||q2||&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"/industry/"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;||nn||&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;".csv"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;call&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'z2'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;, y4);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;/************************************************************************/&lt;/P&gt;&lt;P&gt;/* Download data */&lt;/P&gt;&lt;P&gt;/************************************************************************/&lt;/P&gt;&lt;P&gt;/* Set filenames*/&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;filename&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; website1 url &amp;amp;z1;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;filename&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; copy1 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'C:\temp\file1.csv'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;filename&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; website2 url &amp;amp;z2;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;filename&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; copy2 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'C:\temp\file2.csv'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;and this is the error I get:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Error in the FILENAME statement.&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the macro variable "Z1".&lt;/P&gt;&lt;P&gt;1 &lt;A href="http://www.bls.gov/cew/data/api/2012/1/industry/10.csv" target="_blank"&gt;http://www.bls.gov/cew/data/api/2012/1/industry/10.csv&lt;/A&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;23&lt;/P&gt;&lt;P&gt;ERROR 23-2: Invalid option name //.&lt;/P&gt;&lt;P&gt;1 ! &lt;A href="http://www.bls.gov/cew/data/api/2012/1/industry/10.csv" target="_blank"&gt;http://www.bls.gov/cew/data/api/2012/1/industry/10.csv&lt;/A&gt;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;23&lt;/P&gt;&lt;P&gt;ERROR 23-2: Invalid option name cew.&lt;/P&gt;&lt;P&gt;1 ! &lt;A href="http://www.bls.gov/cew/data/api/2012/1/industry/10.csv" target="_blank"&gt;http://www.bls.gov/cew/data/api/2012/1/industry/10.csv&lt;/A&gt;&lt;/P&gt;&lt;P&gt;----&lt;/P&gt;&lt;P&gt;23&lt;/P&gt;&lt;P&gt;ERROR 23-2: Invalid option name data.&lt;/P&gt;&lt;P&gt;1 ! &lt;A href="http://www.bls.gov/cew/data/api/2012/1/industry/10.csv" target="_blank"&gt;http://www.bls.gov/cew/data/api/2012/1/industry/10.csv&lt;/A&gt;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;23&lt;/P&gt;&lt;P&gt;ERROR 23-2: Invalid option name api.&lt;/P&gt;&lt;P&gt;1 ! &lt;A href="http://www.bls.gov/cew/data/api/2012/1/industry/10.csv" target="_blank"&gt;http://www.bls.gov/cew/data/api/2012/1/industry/10.csv&lt;/A&gt;&lt;/P&gt;&lt;P&gt;--------&lt;/P&gt;&lt;P&gt;23&lt;/P&gt;&lt;P&gt;ERROR 23-2: Invalid option name industry.&lt;/P&gt;&lt;P&gt;1 ! &lt;A href="http://www.bls.gov/cew/data/api/2012/1/industry/10.csv" target="_blank"&gt;http://www.bls.gov/cew/data/api/2012/1/industry/10.csv&lt;/A&gt;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;23&lt;/P&gt;&lt;P&gt;ERROR 23-2: Invalid option name csv.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2016 16:35:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-construct-a-url-from-input/m-p/266095#M269297</guid>
      <dc:creator>ajffja</dc:creator>
      <dc:date>2016-04-25T16:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I construct a url from input?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-construct-a-url-from-input/m-p/266096#M269298</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call symput('z1', y5);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That should be y3, not y5?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let nptyr1 = 2012;
%let nptyr2 = 2013;
%let nptqtr1 = 1;
%let nptqtr2 = 1;
%let indstry = 10;
　
data Temp0;
y1 = &amp;amp;nptyr1;
q1 = &amp;amp;nptqtr1;
y2 = &amp;amp;nptyr2;
q2 = &amp;amp;nptqtr2;
nn = &amp;amp;indstry;
y3 = catt('http://www.bls.gov/cew/data/api/',y1,'/',q1,'/industry/',nn,'.csv');
call symputx('z1', y3);
y4 = catt('http://www.bls.gov/cew/data/api/',y2,'/',q2,'/industry/',nn,'.csv');
call symput('z2', y4);
run;

%put &amp;amp;z1;
%put &amp;amp;z2.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Apr 2016 16:42:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-construct-a-url-from-input/m-p/266096#M269298</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-25T16:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I construct a url from input?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-construct-a-url-from-input/m-p/266097#M269299</link>
      <description>&lt;P&gt;Also, you probably don't need to assign the values to a variable, you should be able to use the variables directly in the catt function.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2016 16:43:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-construct-a-url-from-input/m-p/266097#M269299</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-04-25T16:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I construct a url from input?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-construct-a-url-from-input/m-p/266100#M269300</link>
      <description>&lt;P&gt;The %put statment prints the appropriate url, but when this is passed into a filename statement the same error occurs. It does look like more efficient code.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2016 16:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-construct-a-url-from-input/m-p/266100#M269300</guid>
      <dc:creator>ajffja</dc:creator>
      <dc:date>2016-04-25T16:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I construct a url from input?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-construct-a-url-from-input/m-p/266101#M269301</link>
      <description>&lt;P&gt;Good catch on the y5 y3 thing. Thanks. I was trying a different thing where I called it a url in the data step, and that didn't work either.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2016 16:51:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-construct-a-url-from-input/m-p/266101#M269301</guid>
      <dc:creator>ajffja</dc:creator>
      <dc:date>2016-04-25T16:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I construct a url from input?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-construct-a-url-from-input/m-p/266111#M269302</link>
      <description>&lt;P&gt;The value of Y4 does not include quotation marks.&amp;nbsp; You may have the correct syntax to construct the URL, but you still need to add the quotes in the FILENAME statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename website2 url "&amp;amp;z2";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2016 17:04:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-construct-a-url-from-input/m-p/266111#M269302</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-04-25T17:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I construct a url from input?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-construct-a-url-from-input/m-p/266125#M269303</link>
      <description>&lt;P&gt;The FILENAME statement needs a quoted string. &amp;nbsp;You might want to add the quotes in the data step since some URLs can include &amp;amp; and that can confuse SAS. &amp;nbsp;Surrounding the values with single quotes will prevent SAS from treating any &amp;amp; in the URL as macro triggers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;y3 = cats("'"
         ,catx('/'
              ,'http://www.bls.gov/cew/data/api'
              ,y1
              ,q1
              ,'industry'
              ,cats(nn,'.csv')
              )
         ,"'"
         )
;
call symputX('z1', y3);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Apr 2016 17:22:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-construct-a-url-from-input/m-p/266125#M269303</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-04-25T17:22:36Z</dc:date>
    </item>
  </channel>
</rss>

