<?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 Reading a data from external file in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-data-from-external-file-in-SAS/m-p/256867#M49278</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;How to read a data from an external file and store it in a variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;Say i have a external file with 62K thousand records. There is no space delimiters nothing. However, i need to read 1 to 30k records and store it A variable and 30K to 60l records i need to store it in B variable. Please guide me how i can achieve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Abhi&lt;/P&gt;</description>
    <pubDate>Tue, 15 Mar 2016 18:23:57 GMT</pubDate>
    <dc:creator>Abhi1212</dc:creator>
    <dc:date>2016-03-15T18:23:57Z</dc:date>
    <item>
      <title>Reading a data from external file in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-data-from-external-file-in-SAS/m-p/256867#M49278</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;How to read a data from an external file and store it in a variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;Say i have a external file with 62K thousand records. There is no space delimiters nothing. However, i need to read 1 to 30k records and store it A variable and 30K to 60l records i need to store it in B variable. Please guide me how i can achieve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Abhi&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2016 18:23:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-a-data-from-external-file-in-SAS/m-p/256867#M49278</guid>
      <dc:creator>Abhi1212</dc:creator>
      <dc:date>2016-03-15T18:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a data from external file in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-data-from-external-file-in-SAS/m-p/256873#M49282</link>
      <description>&lt;P&gt;Hi mate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try to use the infile and input:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;One for the first 30000 values:
  Infile "Your-file.txt" dlm = " " firstobs=1 obs=30000;
  input #1 entire_row1 $1-220;

One for the last values:
  Infile "Your-file.txt" dlm = " " firstobs=30000 obs=62000;
  input #1 entire_row2 $1-220;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2016 19:04:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-a-data-from-external-file-in-SAS/m-p/256873#M49282</guid>
      <dc:creator>DartRodrigo</dc:creator>
      <dc:date>2016-03-15T19:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a data from external file in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-data-from-external-file-in-SAS/m-p/256908#M49287</link>
      <description>&lt;P&gt;It's a bit unclear what you want to do.&lt;/P&gt;
&lt;P&gt;Do you have a text file that is just...text...no natural variables...?&lt;/P&gt;
&lt;P&gt;And&amp;nbsp;then, you want to store 30K (no of?) records (how long is a record) into a variable. A data set variable?&lt;/P&gt;
&lt;P&gt;Could it be that you are mixing up the terminology. 30K of text (chars), into one variable...?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, I'm a bit curious, what's the application?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2016 21:02:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-a-data-from-external-file-in-SAS/m-p/256908#M49287</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-03-15T21:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a data from external file in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-data-from-external-file-in-SAS/m-p/256951#M49297</link>
      <description>Hi,&lt;BR /&gt;The file is seem to be like extracted from copybook.. As I already&lt;BR /&gt;explained. .With that data I need to create a table in SAS. I have&lt;BR /&gt;attached the template and raw data. The data starts from ALH ends with the&lt;BR /&gt;time. At the middle we have delimiters space and ^T we have to avoid those.&lt;BR /&gt;And if suppose the file exceeds the maximum variable size which is 32K at&lt;BR /&gt;that case how can I read the data. This is my question.&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Wed, 16 Mar 2016 03:58:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-a-data-from-external-file-in-SAS/m-p/256951#M49297</guid>
      <dc:creator>Abhi1212</dc:creator>
      <dc:date>2016-03-16T03:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a data from external file in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-data-from-external-file-in-SAS/m-p/256952#M49298</link>
      <description>Where u r defining the variable like. . Which set of data will be set in A&lt;BR /&gt;variable and which in B?&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Wed, 16 Mar 2016 04:00:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-a-data-from-external-file-in-SAS/m-p/256952#M49298</guid>
      <dc:creator>Abhi1212</dc:creator>
      <dc:date>2016-03-16T04:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a data from external file in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-data-from-external-file-in-SAS/m-p/256996#M49306</link>
      <description>&lt;P&gt;In my guess, Linus, he want to split his import in two variables.&lt;/P&gt;
&lt;P&gt;From the line 1 to 32k will be set in variable A and the last lines will be set in variable B.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;infile "file" firstobs=1 obs=32000;&lt;BR /&gt;input Entire_Row1 $1-220; /*This var starts in line one until 32k*/&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;input Entire_Row2 $1-220;&amp;nbsp;/*This var starts in line 32001 until 62k*/&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 12:37:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-a-data-from-external-file-in-SAS/m-p/256996#M49306</guid>
      <dc:creator>DartRodrigo</dc:creator>
      <dc:date>2016-03-16T12:37:54Z</dc:date>
    </item>
  </channel>
</rss>

