<?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 ERROR: File Name value exceeds maximum length of 201 characters in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-File-Name-value-exceeds-maximum-length-of-201-characters/m-p/791710#M253633</link>
    <description>&lt;P&gt;Hi i am in new in SAS and try to extract the below dataset in Excel using the code below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, i receive this error message (i have deleted the full path after the "resolves to")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;SYMBOLGEN: Macro variable OUTPUT_LOC resolves to........&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;ERROR: File Name value exceeds maximum length of 201 characters.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be appreciated&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data mydata1;                    
   input IDnumber $ Week1 Week16;     
   datalines;           
2477 195  163
2431 220  198
2456 173  155
2412 135  116
;                           
run;

proc export dbms=excelcs 
data= mydata1
outfile="&amp;amp;output_loc.\mydataexp.xls";
sheet=test1;
version="2002";                        
server='servername'; 
port=8888;  
serveruser=&amp;amp;LAN_username.;
serverpass="&amp;amp;LAN_password.";
run;
	&lt;/PRE&gt;</description>
    <pubDate>Sun, 23 Jan 2022 16:03:57 GMT</pubDate>
    <dc:creator>Toni2</dc:creator>
    <dc:date>2022-01-23T16:03:57Z</dc:date>
    <item>
      <title>ERROR: File Name value exceeds maximum length of 201 characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-File-Name-value-exceeds-maximum-length-of-201-characters/m-p/791710#M253633</link>
      <description>&lt;P&gt;Hi i am in new in SAS and try to extract the below dataset in Excel using the code below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, i receive this error message (i have deleted the full path after the "resolves to")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;SYMBOLGEN: Macro variable OUTPUT_LOC resolves to........&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;ERROR: File Name value exceeds maximum length of 201 characters.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be appreciated&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data mydata1;                    
   input IDnumber $ Week1 Week16;     
   datalines;           
2477 195  163
2431 220  198
2456 173  155
2412 135  116
;                           
run;

proc export dbms=excelcs 
data= mydata1
outfile="&amp;amp;output_loc.\mydataexp.xls";
sheet=test1;
version="2002";                        
server='servername'; 
port=8888;  
serveruser=&amp;amp;LAN_username.;
serverpass="&amp;amp;LAN_password.";
run;
	&lt;/PRE&gt;</description>
      <pubDate>Sun, 23 Jan 2022 16:03:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-File-Name-value-exceeds-maximum-length-of-201-characters/m-p/791710#M253633</guid>
      <dc:creator>Toni2</dc:creator>
      <dc:date>2022-01-23T16:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: File Name value exceeds maximum length of 201 characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-File-Name-value-exceeds-maximum-length-of-201-characters/m-p/791711#M253634</link>
      <description>&lt;P&gt;Someone else just had the same problem with PROC EXPORT.&amp;nbsp; There appears to be a bug in the code in PROC EXPORT that is limiting explicit filenames in the call to 200 characters.&amp;nbsp; I believe they solved it by making a fileref and using that in the PROC call.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename myfile "&amp;amp;output_loc.\mydataexp.xls";

proc export dbms=xlsx 
data= mydata1
outfile=myfile;
sheet=test1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But I don't think that will work if you are trying to use the SAS PC FILES server to write your excel file to some location that SAS cannot write to itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jan 2022 16:26:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-File-Name-value-exceeds-maximum-length-of-201-characters/m-p/791711#M253634</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-23T16:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: File Name value exceeds maximum length of 201 characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-File-Name-value-exceeds-maximum-length-of-201-characters/m-p/791716#M253639</link>
      <description>&lt;P&gt;hi, thanks. Yes, it does not work. I run it and saw the below in the log (i have replaced the path with dots (.....)). I did not receive any errors thought. I try to save it in a shared drive&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any workaround ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ERROR: Temporary file for XLSX file can not be created -&amp;gt; 
/sas94/lev3/config/grid/Lev3/SASMain/\\..................................xls.$$1.  Make sure the path name is correct and that you have write permission.
NOTE: The SAS System stopped processing this step because of errors.
&lt;/PRE&gt;</description>
      <pubDate>Sun, 23 Jan 2022 16:47:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-File-Name-value-exceeds-maximum-length-of-201-characters/m-p/791716#M253639</guid>
      <dc:creator>Toni2</dc:creator>
      <dc:date>2022-01-23T16:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: File Name value exceeds maximum length of 201 characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-File-Name-value-exceeds-maximum-length-of-201-characters/m-p/791717#M253640</link>
      <description>&lt;P&gt;The path you are using is NOT valid on the machine where SAS is running.&lt;/P&gt;
&lt;P&gt;That is why your original code is the SAS PC FILES server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the issue is that you have created an unwieldy naming convention that has resulted in a filename that is not only impossible for humans to comprehend but exceeds the limits that this SAS process has.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If cannot get that naming convention shorted to something that is less than 200 characters then it sounds like your only choices are:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Get your UNIX support team can mount the shared disk on the UNIX machine where SAS is running.&amp;nbsp; Then use the UNIX path that they created for the shared disk to write to the file from SAS as in the code I posted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) Have the WINDOWS support team that is running the WINDOWS machine where the SAS PC FILES server is running to map a drive letter to some part of that shared folder path so that the path you pass can be less than 200 characters.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jan 2022 16:56:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-File-Name-value-exceeds-maximum-length-of-201-characters/m-p/791717#M253640</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-23T16:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: File Name value exceeds maximum length of 201 characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-File-Name-value-exceeds-maximum-length-of-201-characters/m-p/791721#M253643</link>
      <description>thank you</description>
      <pubDate>Sun, 23 Jan 2022 17:33:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-File-Name-value-exceeds-maximum-length-of-201-characters/m-p/791721#M253643</guid>
      <dc:creator>Toni2</dc:creator>
      <dc:date>2022-01-23T17:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: File Name value exceeds maximum length of 201 characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-File-Name-value-exceeds-maximum-length-of-201-characters/m-p/865935#M341976</link>
      <description>&lt;P&gt;Worked for me. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 14:04:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-File-Name-value-exceeds-maximum-length-of-201-characters/m-p/865935#M341976</guid>
      <dc:creator>chadadkinsEKU</dc:creator>
      <dc:date>2023-03-23T14:04:01Z</dc:date>
    </item>
  </channel>
</rss>

