<?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: logically importing massive data in saseg 5.1 in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/logically-importing-massive-data-in-saseg-5-1/m-p/127493#M10521</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sandy,&amp;nbsp; you look fantastic !!!&amp;nbsp;&amp;nbsp; I'm think about a simple process where you can list all the states in a macro variable then parse the macro variable with another macro called %word_cnt.&amp;nbsp;&amp;nbsp;&amp;nbsp; Word count just counts the number of words in a macro variable is list format.&amp;nbsp; I have 2 %let statements one for the state names/file names and one for the result dataset(not necessary since you will use only the master set, _allstates).&amp;nbsp; The read_txtFiles will read all the txt files listed, I used proc import for the read and force on the append incase of attribute mismatches.&amp;nbsp; I have a process similar reading in multiple spreadsheets from a workbook and multiple files where I do a "%sysexec dir /O:D "&amp;amp;_dir1\*.log" &amp;gt; "&amp;amp;_dir3\wc_file.txt" ;" to read in the directory where the files are located. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%macro _wordcntC(list);&lt;BR /&gt; %global wrd_cnt;&lt;BR /&gt; %let wrd_cnt=%sysfunc(countw(%nrquote(&amp;amp;list),%str(,)));&lt;BR /&gt; %put "# of words in list are&amp;nbsp; &amp;amp;wrd_cnt";&lt;BR /&gt;%mend _wordcntC;&lt;/P&gt;&lt;P&gt;******&amp;nbsp; keep what is above&amp;nbsp; ****************;&lt;BR /&gt;%let _states="Illinois, NewYork, New Mexico, California";&lt;BR /&gt;%let _dsnlst=Illinois, New York, New Mexico, California;&lt;BR /&gt;%_wordcntC(&amp;amp;_states);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%macro read_txtFiles(states);&lt;BR /&gt; %local state;&lt;/P&gt;&lt;P&gt; %do j = 1 %to &amp;amp;wrd_cnt;&lt;BR /&gt;&amp;nbsp; %let word=%qscan(%nrquote(&amp;amp;states),&amp;amp;j,%str(,));&lt;BR /&gt;&amp;nbsp; %let _dsn=%qscan(%nrquote(&amp;amp;_dsnlst),&amp;amp;j,%str(,));&lt;/P&gt;&lt;P&gt;&amp;nbsp; PROC IMPORT OUT=&amp;amp;dsn&lt;BR /&gt;&amp;nbsp;&amp;nbsp; DATAFILE=&amp;amp;_dsn..txt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; SCANTEXT=YES;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; USEDATE=YES;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; SCANTIME=YES;&lt;BR /&gt;&amp;nbsp; RUN;&lt;/P&gt;&lt;P&gt; proc append base=_allstates&amp;nbsp; data=&amp;amp;syslast force;&lt;BR /&gt; run;&lt;BR /&gt; &lt;BR /&gt; proc datasets lib=WORK;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete &amp;amp;dsn;&lt;BR /&gt; quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; filename _all_ clear;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; %end;&lt;BR /&gt;%mend read_txtFiles;&lt;/P&gt;&lt;P&gt;%read_txtFiles(&amp;amp;_states);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jan 2013 21:07:47 GMT</pubDate>
    <dc:creator>bwasicak</dc:creator>
    <dc:date>2013-01-16T21:07:47Z</dc:date>
    <item>
      <title>logically importing massive data in saseg 5.1</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/logically-importing-massive-data-in-saseg-5-1/m-p/127491#M10519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/*Hi All, I really appreciate help on this one....*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;This is about census data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am planning to get census data for each state from sf1 (summary file1) file. from here &lt;A href="http://www2.census.gov/census_2010/04-Summary_File_1/"&gt;http://www2.census.gov/census_2010/04-Summary_File_1/&lt;/A&gt;. this one has a lot of detail regarding each state.&lt;/P&gt;&lt;P&gt;under each state they have 47 files which we can save in .txt on machine and can pull the data into the SAS. I have variable details for all 47 files for each state.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone please tell me how i can import &lt;STRONG&gt;47 different files data&lt;/STRONG&gt; which has different no. of obeservation and variables (has some common related variables in all 47 data files) at same time rather than pulling data seperately for each file?&lt;/P&gt;&lt;P&gt;I can import each data file simply using import process but it will take long for 47 files for each state. I am looking for some MACRO or any other kind of logical code which could bring in all 47 files at same time. so i don't have to do it seperately for 47 files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 17:21:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/logically-importing-massive-data-in-saseg-5-1/m-p/127491#M10519</guid>
      <dc:creator>sas_9</dc:creator>
      <dc:date>2013-01-16T17:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: logically importing massive data in saseg 5.1</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/logically-importing-massive-data-in-saseg-5-1/m-p/127492#M10520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;forgot to add&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will make one final dataset after importing all 47 files...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 19:43:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/logically-importing-massive-data-in-saseg-5-1/m-p/127492#M10520</guid>
      <dc:creator>sas_9</dc:creator>
      <dc:date>2013-01-16T19:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: logically importing massive data in saseg 5.1</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/logically-importing-massive-data-in-saseg-5-1/m-p/127493#M10521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sandy,&amp;nbsp; you look fantastic !!!&amp;nbsp;&amp;nbsp; I'm think about a simple process where you can list all the states in a macro variable then parse the macro variable with another macro called %word_cnt.&amp;nbsp;&amp;nbsp;&amp;nbsp; Word count just counts the number of words in a macro variable is list format.&amp;nbsp; I have 2 %let statements one for the state names/file names and one for the result dataset(not necessary since you will use only the master set, _allstates).&amp;nbsp; The read_txtFiles will read all the txt files listed, I used proc import for the read and force on the append incase of attribute mismatches.&amp;nbsp; I have a process similar reading in multiple spreadsheets from a workbook and multiple files where I do a "%sysexec dir /O:D "&amp;amp;_dir1\*.log" &amp;gt; "&amp;amp;_dir3\wc_file.txt" ;" to read in the directory where the files are located. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%macro _wordcntC(list);&lt;BR /&gt; %global wrd_cnt;&lt;BR /&gt; %let wrd_cnt=%sysfunc(countw(%nrquote(&amp;amp;list),%str(,)));&lt;BR /&gt; %put "# of words in list are&amp;nbsp; &amp;amp;wrd_cnt";&lt;BR /&gt;%mend _wordcntC;&lt;/P&gt;&lt;P&gt;******&amp;nbsp; keep what is above&amp;nbsp; ****************;&lt;BR /&gt;%let _states="Illinois, NewYork, New Mexico, California";&lt;BR /&gt;%let _dsnlst=Illinois, New York, New Mexico, California;&lt;BR /&gt;%_wordcntC(&amp;amp;_states);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%macro read_txtFiles(states);&lt;BR /&gt; %local state;&lt;/P&gt;&lt;P&gt; %do j = 1 %to &amp;amp;wrd_cnt;&lt;BR /&gt;&amp;nbsp; %let word=%qscan(%nrquote(&amp;amp;states),&amp;amp;j,%str(,));&lt;BR /&gt;&amp;nbsp; %let _dsn=%qscan(%nrquote(&amp;amp;_dsnlst),&amp;amp;j,%str(,));&lt;/P&gt;&lt;P&gt;&amp;nbsp; PROC IMPORT OUT=&amp;amp;dsn&lt;BR /&gt;&amp;nbsp;&amp;nbsp; DATAFILE=&amp;amp;_dsn..txt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; SCANTEXT=YES;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; USEDATE=YES;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; SCANTIME=YES;&lt;BR /&gt;&amp;nbsp; RUN;&lt;/P&gt;&lt;P&gt; proc append base=_allstates&amp;nbsp; data=&amp;amp;syslast force;&lt;BR /&gt; run;&lt;BR /&gt; &lt;BR /&gt; proc datasets lib=WORK;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete &amp;amp;dsn;&lt;BR /&gt; quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; filename _all_ clear;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; %end;&lt;BR /&gt;%mend read_txtFiles;&lt;/P&gt;&lt;P&gt;%read_txtFiles(&amp;amp;_states);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 21:07:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/logically-importing-massive-data-in-saseg-5-1/m-p/127493#M10521</guid>
      <dc:creator>bwasicak</dc:creator>
      <dc:date>2013-01-16T21:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: logically importing massive data in saseg 5.1</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/logically-importing-massive-data-in-saseg-5-1/m-p/127494#M10522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you sir, i will consider this and will let you know soon how it goes...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2013 15:04:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/logically-importing-massive-data-in-saseg-5-1/m-p/127494#M10522</guid>
      <dc:creator>sas_9</dc:creator>
      <dc:date>2013-01-17T15:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: logically importing massive data in saseg 5.1</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/logically-importing-massive-data-in-saseg-5-1/m-p/127495#M10523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello sir, i may need your further help. i am not that familiar with macro that much. so if you can give me value to put in -&amp;nbsp; would appreciate your time...my detail is as below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have 2 folder and each contains 47 txt files. for now i am trying to pull up data for 2 states only. rhode island (ri) and delaware (de) for testing purpose...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ri - "C:\Documents and Settings\xyz\Desktop"&lt;/P&gt;&lt;P&gt;de - "C:\Documents and Settings\xyz\Desktop"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you please correct my value i ahve put if its not correct...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*before i go ahead and run the code i wants to make sure i am putting correct value in the code that you have provided -Thanks*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%macro _wordcntC(ri,de); /*Here ri and de are the fodlers and each foldes has 47 .txt file*/&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;%global wrd_cnt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;%let wrd_cnt=%sysfunc(countw(%nrquote(&amp;amp;ri,de),%str(,)));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;%put "# of words in list are&amp;nbsp; &amp;amp;wrd_cnt";&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;%mend _wordcntC;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;******&amp;nbsp; keep what is above&amp;nbsp; ****************;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;%let _states="ri,de";&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;%let _dsnlst=ri,de;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;%_wordcntC(&amp;amp;_states);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;%macro read_txtFiles(ri,de);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;%local state;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%do j = 1 %to &amp;amp;wrd_cnt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; %let word=%qscan(%nrquote(&amp;amp;states),&amp;amp;j,%str(,));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; %let _dsn=%qscan(%nrquote(&amp;amp;_dsnlst),&amp;amp;j,%str(,));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; PROC IMPORT OUT=&amp;amp;dsn&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; DATAFILE=&amp;amp;_dsn..txt; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; SCANTEXT=YES;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; USEDATE=YES;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; SCANTIME=YES;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; RUN;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc append base=_allstates&amp;nbsp; data=&amp;amp;syslast force;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc datasets lib=WORK;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete &amp;amp;dsn;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; filename _all_ clear;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;%end;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;%mend read_txtFiles;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%read_txtFiles(&amp;amp;_states);&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2013 17:19:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/logically-importing-massive-data-in-saseg-5-1/m-p/127495#M10523</guid>
      <dc:creator>sas_9</dc:creator>
      <dc:date>2013-01-17T17:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: logically importing massive data in saseg 5.1</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/logically-importing-massive-data-in-saseg-5-1/m-p/127496#M10524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Close - the code is two macros, one to count the words in any macro variable separated by commas and a space.&amp;nbsp; The result is just the number of words in the list, in the example it should be two.&amp;nbsp; Your SAS log will show this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second macro is %read_txtFiles.&amp;nbsp; It will do just that.&amp;nbsp; It will run twice for de and ri, or to the count of &amp;amp;wrd_cnt.&amp;nbsp; parse the _states macro and read in each state file.&amp;nbsp; The proc import can be changed to any metod to import the txt file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All you really need to change is the %let _states list with the list of states to read, originally 47.&amp;nbsp; change the %let _dsn to simple state names, can be the same as _states.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the options statement to show how the macro is resolving&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro _wordcntC(list);&lt;BR /&gt; %global wrd_cnt;&lt;BR /&gt; %let wrd_cnt=%sysfunc(countw(%nrquote(&amp;amp;list),%str(,)));&lt;BR /&gt; %put "# of words in list are&amp;nbsp; &amp;amp;wrd_cnt";&lt;BR /&gt;%mend _wordcntC;&lt;BR /&gt;******&amp;nbsp; keep what is above&amp;nbsp; ****************;&lt;/P&gt;&lt;P&gt;******&amp;nbsp; my example of the state list&amp;nbsp; *****************;&lt;BR /&gt;%let _states="Illinois, NewYork, New Mexico, California";&lt;BR /&gt;******&amp;nbsp; single sas dataset output from macro&amp;nbsp; *********;&lt;BR /&gt;%let _dsnlst=Illinois, New York, New Mexico, California;&lt;/P&gt;&lt;P&gt;*****&amp;nbsp; call the macro _wordcntC to get the number of states in the %let _states list *****;&lt;BR /&gt;*****&amp;nbsp; for your example this should be 2, make sure you have spaces between the states like below ***;&lt;BR /&gt;%let _states="ri, de";&lt;BR /&gt;%let _dsnlst=ri, de;&lt;/P&gt;&lt;P&gt;%_wordcntC(&amp;amp;_states);&lt;/P&gt;&lt;P&gt;options mprint mlogic symbolgen;&lt;/P&gt;&lt;P&gt;%macro read_txtFiles(states);&lt;BR /&gt;%local state;&lt;/P&gt;&lt;P&gt;***&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***;&lt;BR /&gt;***&amp;nbsp; read each state in from the _states list macro variable&amp;nbsp; ***;&lt;BR /&gt;***&amp;nbsp; assign it to a new macro variable word&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***;&lt;BR /&gt;***&amp;nbsp; the proc import will import the file from the desktop&amp;nbsp;&amp;nbsp;&amp;nbsp; ***;&lt;BR /&gt;***&amp;nbsp; the result sas dsn will be appended to _allstates&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***;&lt;/P&gt;&lt;P&gt;%do j = 1 %to &amp;amp;wrd_cnt;&lt;BR /&gt;&amp;nbsp; %let word=%qscan(%nrquote(&amp;amp;states),&amp;amp;j,%str(,));&lt;BR /&gt;&amp;nbsp; %let _dsn=%qscan(%nrquote(&amp;amp;_dsnlst),&amp;amp;j,%str(,));&lt;/P&gt;&lt;P&gt;&amp;nbsp; PROC IMPORT OUT=&amp;amp;_dsn&lt;BR /&gt;&amp;nbsp;&amp;nbsp; DATAFILE="C:\Documents and Settings\xyz\Desktop\&amp;amp;word..txt"; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; SCANTEXT=YES;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; USEDATE=YES;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; SCANTIME=YES;&lt;BR /&gt;&amp;nbsp; RUN;&lt;/P&gt;&lt;P&gt;proc append base=_allstates&amp;nbsp; data=&amp;amp;syslast force;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc datasets lib=WORK;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete &amp;amp;dsn;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; filename _all_ clear;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;%end;&lt;BR /&gt;%mend read_txtFiles;&lt;/P&gt;&lt;P&gt;%read_txtFiles(&amp;amp;_states);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jan 2013 17:55:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/logically-importing-massive-data-in-saseg-5-1/m-p/127496#M10524</guid>
      <dc:creator>bwasicak</dc:creator>
      <dc:date>2013-01-17T17:55:52Z</dc:date>
    </item>
  </channel>
</rss>

