<?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: file name and quotation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916275#M360934</link>
    <description>&lt;P&gt;Please post the complete log of the step by copy/pasting the text into a window opened with this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Feb 2024 11:18:49 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2024-02-15T11:18:49Z</dc:date>
    <item>
      <title>file name and quotation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916240#M360925</link>
      <description>&lt;PRE&gt;data monthly.apple_20230630;
infile "/boccc/interface/monthly.apple.20230630" truncover lrecl=138 recfm=F;
input @002 account_no $29.
etc&lt;/PRE&gt;
&lt;P&gt;when I run it says quoted string currently being processed has become more thatn 262 bytes long&lt;/P&gt;
&lt;P&gt;Is this due to file name with '.' inside? how can I change it so it can read?&lt;/P&gt;
&lt;P&gt;does using ' instead of " in&amp;nbsp;infile "/boccc/interface/monthly.apple.20230630" truncover lrecl=138 recfm=F;&lt;/P&gt;
&lt;P&gt;helps?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 04:06:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916240#M360925</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2024-02-15T04:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: file name and quotation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916244#M360926</link>
      <description>&lt;P&gt;This suggests to me that there is an unmatched double quote earlier in your program.&amp;nbsp; If that is the case, then when the first double quote in the INFILE statement is encountered, it is considered as a match for that preceding quote, which is apparently more than 262 characters earlier in your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check the code preceding the INFILE statement for unmatched quotes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And make sure you restart the SAS session before you submit the corrected code.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 04:23:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916244#M360926</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2024-02-15T04:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: file name and quotation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916254#M360927</link>
      <description>&lt;PRE&gt;infile "/boccc/interface/monthly.apple.20230630" truncover lrecl=138 recfm=F;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;ignoring double quote problem&lt;/P&gt;
&lt;P&gt;how about this filename, could it be read inside single or double quotation mark in infile statement?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 04:57:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916254#M360927</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2024-02-15T04:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: file name and quotation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916255#M360928</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416388"&gt;@HeatherNewton&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;PRE&gt;infile "/boccc/interface/monthly.apple.20230630" truncover lrecl=138 recfm=F;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;ignoring double quote problem&lt;/P&gt;
&lt;P&gt;how about this filename, could it be read inside single or double quotation mark in infile statement?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes.&lt;/P&gt;
&lt;P&gt;You can use either single quotes to set the boundaries of the string literal. Or double quotes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there happens to be one of the boundary characters in the actual name then double it up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you could use either of these lines&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile '/don''t use names like this.dat'  truncover lrecl=138 recfm=F;&amp;nbsp;
infile "/don't use names like this.dat"  truncover lrecl=138 recfm=F;&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Feb 2024 05:05:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916255#M360928</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-02-15T05:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: file name and quotation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916263#M360933</link>
      <description>&lt;P&gt;now I confirmed it is reading fine from infile&lt;BR /&gt;but I dont manage to output to the output dataset after the transformation in the datastep, please check for me if this line in the data step is fine too&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;point=index(tmp01,'monthly.apple.20231130');&lt;/P&gt;
&lt;P&gt;is this line going to run ok&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my problem is after the log tells me the infile reads ok&lt;/P&gt;
&lt;P&gt;it shows me the output dataset is empty&lt;/P&gt;
&lt;P&gt;and it also shows no problem in the transformation&lt;/P&gt;
&lt;P&gt;it looks like it cannot write to the output dataset because I am sure it shouldnt be empty&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 07:34:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916263#M360933</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2024-02-15T07:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: file name and quotation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916275#M360934</link>
      <description>&lt;P&gt;Please post the complete log of the step by copy/pasting the text into a window opened with this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 11:18:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916275#M360934</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-02-15T11:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: file name and quotation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916294#M360938</link>
      <description>&lt;P&gt;Did you post a complete data step before?&lt;/P&gt;
&lt;P&gt;Anyway this line looks fine by itself.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;point=index(tmp01,'monthly.apple.20231130');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That is an assignment statement.&amp;nbsp; It will find where in the character variable TMP01 the string 'month.apple.20231130' starts and returns that position number to the variable POINT. If the substring is not found it will return a position of 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So TMP01 should be an existing character variable.&amp;nbsp; POINT should be numeric and will be if it was not previously defined as character by something earlier in the data step.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 13:47:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916294#M360938</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-02-15T13:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: file name and quotation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916300#M360939</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416388"&gt;@HeatherNewton&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;PRE&gt;data monthly.apple_20230630;
infile "/boccc/interface/monthly.apple.20230630" truncover lrecl=138 recfm=F;
input @002 account_no $29.
etc&lt;/PRE&gt;
&lt;P&gt;when I run it says quoted string currently being processed has become more thatn 262 bytes long&lt;/P&gt;
&lt;P&gt;Is this due to file name with '.' inside? how can I change it so it can read?&lt;/P&gt;
&lt;P&gt;does using ' instead of " in&amp;nbsp;infile "/boccc/interface/monthly.apple.20230630" truncover lrecl=138 recfm=F;&lt;/P&gt;
&lt;P&gt;helps?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you start a new session and run:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data monthly.apple_20230630;
  infile "/boccc/interface/monthly.apple.20230630" truncover lrecl=138 recfm=F;
  input @002 account_no $29. ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;you will not get that message.&amp;nbsp; That message is only generated when a quoted string really is longer than 262 characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Usually in this case where you can't see an unmatched quote, and can't see a long string, it means you had an earlier unmatched quote somewhere in your SAS code / SAS session.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The easiest way to close an unmatched quote is to start a fresh SAS session.&amp;nbsp; Alternatively you can try submitting&amp;nbsp; a magic string like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*';*";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which could close a prior unmatched quote.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But in order to figure out what caused this problem, you will need to look at the code earlier in your program to search for an unmatched quote.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2024 14:15:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/file-name-and-quotation/m-p/916300#M360939</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2024-02-15T14:15:19Z</dc:date>
    </item>
  </channel>
</rss>

