<?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: SAS txt file extraction problem in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210777#M39061</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kurt, the table names is unknown And there could be&amp;nbsp; more than 1000 log files out there each contain same or different table. I have to use regular expression because other information need to be extracted from the log files. The data step b is only part of the program for demonstration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually I want to know how to use regulat expression to select information in multiple lines. &lt;/P&gt;&lt;P&gt;i have tried \n to read new line. But it doesn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 May 2015 09:43:08 GMT</pubDate>
    <dc:creator>gyambqt</dc:creator>
    <dc:date>2015-05-07T09:43:08Z</dc:date>
    <item>
      <title>SAS txt file extraction problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210774#M39058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Dataset "a" created below is extracted from a log file&lt;/LI&gt;&lt;LI&gt;In the data "b", I want to pull out the information about tables after t_table_list, using regular expression. How do I write the regular expression in data step "b" when the tables' name are displayed in multiple lines?&lt;/LI&gt;&lt;LI&gt;There are thousands of log files, each can has more or less tables than the example provided below. I want to write a universal regular expression that allows me to extract&amp;nbsp; tables for all the log files. for example, in log file 1, there is only 1 table after t_table_list . But in log file2, there could be 100 tables. So I need the regular expression as flexible as possible.&lt;/LI&gt;&lt;/UL&gt;&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;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data a;&lt;BR /&gt;length line $500;&lt;BR /&gt;infile cards dlm="*" truncover;&lt;BR /&gt;input line $150.;&lt;BR /&gt;cards;&lt;BR /&gt;87&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %check (t_table_list=CUTP_TPCR_PIMS&lt;BR /&gt;88&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; CUTP_CTP_CUTG&lt;BR /&gt;89&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; CUTP_TPCR_PIM&lt;BR /&gt;90&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; CUTP_TPCR_PIMQ&lt;BR /&gt;91&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; CUTP_CTP_CUT&lt;BR /&gt;92&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; CUTP_CTP_CUT_C&lt;BR /&gt;93&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; CUTP_CTP_CUTN&lt;BR /&gt;94&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; CUTP_CTP_CUAD&lt;BR /&gt;95&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; CUTP_CTP_CUTC&lt;BR /&gt;96&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; CUTP_TPCR_PIML,&lt;BR /&gt;97&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; l_file_list=,&lt;BR /&gt;98&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; s_file_list=&lt;BR /&gt;99&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data b;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set a;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array rearr {*} regex1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array posarr {*} pos1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array colarr {*} check;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; keep line check ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dimm=1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if _n_=1 then do;&lt;BR /&gt;&amp;nbsp; &lt;STRONG&gt;rearr{1}=prxparse("/.*check\s*.*t_table_list=(.*)/i");&lt;/STRONG&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; retain regex1;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do i=1 to dimm;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; posarr{i}=prxmatch(rearr{i},line);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if prxmatch(rearr{i}, line) then do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wf=prxparen(rearr{i});&lt;BR /&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; call prxposn(rearr{i},wf,posarr{i},len);&lt;BR /&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; colarr{i}=substr(line,posarr{i},len);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 05:07:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210774#M39058</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2015-05-07T05:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS txt file extraction problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210775#M39059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why so complicated? Create a dataset with your table names once and then use that to generate code whenever needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 06:23:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210775#M39059</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-05-07T06:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: SAS txt file extraction problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210776#M39060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Totally agree.&amp;nbsp; Parameters in a dataset then generate the macro call with those parameters rather than trying to acertain after the event.&amp;nbsp; Seems a bit of a dubious macro setup in the first place.&amp;nbsp; Just pass a dataset of tables in rather than an expanding text string.&amp;nbsp; Makes the call simpler and neater:&lt;/P&gt;&lt;P&gt;%check (table_list=work.table_list...);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 08:23:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210776#M39060</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-05-07T08:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS txt file extraction problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210777#M39061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kurt, the table names is unknown And there could be&amp;nbsp; more than 1000 log files out there each contain same or different table. I have to use regular expression because other information need to be extracted from the log files. The data step b is only part of the program for demonstration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;actually I want to know how to use regulat expression to select information in multiple lines. &lt;/P&gt;&lt;P&gt;i have tried \n to read new line. But it doesn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 09:43:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210777#M39061</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2015-05-07T09:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAS txt file extraction problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210778#M39062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So your not actually running the programs yourself then?&amp;nbsp; The reason being is that you will find you life is easier if you setup the run side of things to capture any information you need, if special information is required, then put it out to the log in a set way e.g.&lt;/P&gt;&lt;P&gt;[FOR REPORT] Paramters passed to XYZ macro are: X Y Z&lt;/P&gt;&lt;P&gt;Then its simplified to get this information.&amp;nbsp; Also at run time you can change your running system, instead of putting things like paratemers into a program, collect the information as metadata in datasets, then generate the code from that.&lt;/P&gt;&lt;P&gt;Otherwise you could be searching for quite a bit of complex text to find what you are looking for, e.g. macro resolved text could have all kinds of spacing, line overlaps and other things, quotes will become difficult etc.&lt;/P&gt;&lt;P&gt;Most companies I have seen have a log checker, but these are built to pick up on the specific items thrown in the log, e.g. ERROR:, WARNING:, NOTE:, and thus are generally quite simple.&amp;nbsp; Personally I would follow that approach.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 10:25:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210778#M39062</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-05-07T10:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS txt file extraction problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210779#M39063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI RW9,&lt;/P&gt;&lt;P&gt;I have no control to the macro check in the originally sas program.&lt;/P&gt;&lt;P&gt;but i need to pull out information about tables has been included in the log file after the original sas program run.&lt;/P&gt;&lt;P&gt;what I need to achieve is to modify the regular expression I have used in data step 2 which has been highlighted with dark color above to capture information from dataset a.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 10:33:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210779#M39063</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2015-05-07T10:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS txt file extraction problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210780#M39064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As a general approach, I would read the data one line at a time. Write a regex to recognise the line containing %check and another to recognise the line with the closing brace. Set a state variable when you see the %check to indicate that you are in the list of table names. Use additional regexes and tests of the state variable within the list to distinguish the table names (all caps words with _) from the other parts containing = characters. When your regexes recognise a table name, use the output statement to write a record to your output dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The pseudo-code (not SAS) structure looks like this:&lt;/P&gt;&lt;P&gt;retain inlist&lt;/P&gt;&lt;P&gt;if (regex-function-start) then do&lt;/P&gt;&lt;P&gt;&amp;nbsp; inlist = 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; tablename = substring() /* get the name from after the ( */&lt;/P&gt;&lt;P&gt;&amp;nbsp; output tablename&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if (inlist and regex-table-name) then do&lt;/P&gt;&lt;P&gt;&amp;nbsp; tablename = substring() /* get the name, e.g. without leading spaces */&lt;/P&gt;&lt;P&gt;&amp;nbsp; output tablename&lt;/P&gt;&lt;P&gt;end&lt;/P&gt;&lt;P&gt;if (regex-function-end) then inlist = 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mentioned in an other post, the &lt;A href="http://en.wikipedia.org/wiki/Awk"&gt;awk&lt;/A&gt; program is easier to use than SAS for this type of problem. This case is fairly simple, so SAS can do it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 11:03:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210780#M39064</guid>
      <dc:creator>Peter_L</dc:creator>
      <dc:date>2015-05-12T11:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS txt file extraction problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210781#M39065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use different Perl Regular Express to pull these out .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 14:38:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210781#M39065</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-05-12T14:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS txt file extraction problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210782#M39066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you explain the problem again?&amp;nbsp; Without the assumed solution?&lt;/P&gt;&lt;P&gt;I see that you have these questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;It sounds like you want to scan SAS logs.&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You could write a utility to do this using grep/awk etc or just use a SAS Data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;It sounds like you want to get something them those logs, perhaps the notes that SAS writes when it generates a data set?&lt;/STRONG&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;You might do this with regular expression, but the log messages are regular enough that a simple IF statement is normally all that is needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;It sounds like you want to scan multiple SAS logs.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;My suggestion is get it working for one log file and then just loop over the list of files to scan.&lt;/P&gt;&lt;P&gt;It might be possible to do it all in one step using wildcards in the INFILE statement so that the data step that is scanning reads multiple files. You can use the FILENAME option to get the name of the log file being read.&lt;/P&gt;&lt;P&gt;Or you could use a data set of file names to scan and use the FILEVAR option on the INFILE statement to tell it which file to read.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 15:07:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210782#M39066</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-05-12T15:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAS txt file extraction problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210783#M39067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;length line $500;&lt;/P&gt;&lt;P&gt;infile cards dlm="*" truncover;&lt;/P&gt;&lt;P&gt;input line $150.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;87&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %check (t_table_list=CUTP_TPCR_PIMS&lt;/P&gt;&lt;P&gt;88&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; CUTP_CTP_CUTG&lt;/P&gt;&lt;P&gt;89&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; CUTP_TPCR_PIM&lt;/P&gt;&lt;P&gt;90&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; CUTP_TPCR_PIMQ&lt;/P&gt;&lt;P&gt;91&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; CUTP_CTP_CUT&lt;/P&gt;&lt;P&gt;92&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; CUTP_CTP_CUT_C&lt;/P&gt;&lt;P&gt;93&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; CUTP_CTP_CUTN&lt;/P&gt;&lt;P&gt;94&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; CUTP_CTP_CUAD&lt;/P&gt;&lt;P&gt;95&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; CUTP_CTP_CUTC&lt;/P&gt;&lt;P&gt;96&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; CUTP_TPCR_PIML,&lt;/P&gt;&lt;P&gt;97&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; l_file_list=,&lt;/P&gt;&lt;P&gt;98&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; s_file_list=&lt;/P&gt;&lt;P&gt;99&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt; set a;&lt;/P&gt;&lt;P&gt; length tables $ 40;&lt;/P&gt;&lt;P&gt; if prxmatch('/^\d+\s+%check/',strip(line)) then tables=scan(line,-1,'=');&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if prxmatch('/^\d+\s+\w+\,?$/',strip(line)) then tables=scan(line,-1);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 13:32:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-txt-file-extraction-problem/m-p/210783#M39067</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-05-13T13:32:37Z</dc:date>
    </item>
  </channel>
</rss>

