<?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: Masking sas code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202995#M306131</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your message.&lt;/P&gt;&lt;P&gt;Sorry, if I was not clear in my question. I will try this one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; I can have a sas program with more than 9000 lines of code or more (some times) !!&lt;/P&gt;&lt;P&gt;To resume :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; My input is a sas program with more than 9000 lines of code( you can have the sas proc: sql, iml, print, data set, sas maco, all things, you can get in sas base)&lt;/P&gt;&lt;P&gt;&amp;gt; I want to extract the the rules of the variables in my output( I call it : table target), my variables in the output, they passed by an other tables ( I call these tables : table source)&lt;/P&gt;&lt;P&gt;&amp;gt; I want to have a report likes this :&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="451"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl24" height="17" width="80"&gt;VARIABLE&lt;/TD&gt;&lt;TD class="xl24" style="border-left: none;" width="80"&gt;RULE&lt;/TD&gt;&lt;TD class="xl24" style="border-left: none;" width="132"&gt;TABLE TARGET&lt;/TD&gt;&lt;TD class="xl24" style="border-left: none;" width="159"&gt;TABLE SOURCE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="110" style="border-top: none;"&gt;V&lt;/TD&gt;&lt;TD class="xl26" style="border-top: none; border-left: none;" width="80"&gt;Length V 6 ;&lt;BR /&gt; Format V best32.;&lt;BR /&gt; V=2w+r-2g;&lt;BR /&gt; ......&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;TABTAG1&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;TABSR1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Note : Yes , I agree with that, we can get the variable in the code, but this does not mean, we have made a modification on the variable( as you show with proc print with your exemple), but i am really interested by the real modification, that can modify the result at the end&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 20 Jun 2015 19:43:03 GMT</pubDate>
    <dc:creator>LineMoon</dc:creator>
    <dc:date>2015-06-20T19:43:03Z</dc:date>
    <item>
      <title>Masking sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202989#M306125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please, I have a table with sas code and i want to extract some lines from my table :&amp;nbsp; select text from table where TEXT='xxx';&amp;nbsp; Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table:&lt;/P&gt;&lt;P&gt;TEXT&lt;/P&gt;&lt;P&gt;if xxx then yyyyy do;&lt;/P&gt;&lt;P&gt;xxxxx&lt;/P&gt;&lt;P&gt;end&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let v=&lt;/P&gt;&lt;P&gt;%macro ggg;&lt;/P&gt;&lt;P&gt;%mend ggg;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 22:41:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202989#M306125</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2015-06-10T22:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Masking sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202990#M306126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your question makes no sense to me. Could you please rephrase it in a more understandable way?&lt;/P&gt;&lt;P&gt;Because at the moment I think all you need is a where condition, which is not difficult at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do you store SAS code in a table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 06:46:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202990#M306126</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-06-11T06:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Masking sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202991#M306127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Provide some more detailed input and what the output should look like.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jun 2015 17:08:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202991#M306127</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-06-11T17:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Masking sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202992#M306128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a sas program and I want to extract the variables rule from my pogram &lt;/P&gt;&lt;P&gt;like this as an exemple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;length V 5.;&lt;/P&gt;&lt;P&gt;format&amp;nbsp; V best32.;&lt;/P&gt;&lt;P&gt;W=2*T;&lt;/P&gt;&lt;P&gt;T=P*L;&lt;/P&gt;&lt;P&gt;V=W*T;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2015 07:49:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202992#M306128</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2015-06-20T07:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Masking sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202993#M306129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your message.&lt;/P&gt;&lt;P&gt;I have a sas program( it is my input) and I want to extract the vaiable rules.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2015 07:50:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202993#M306129</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2015-06-20T07:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Masking sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202994#M306130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;What is a variable "rule"? Can you show an ACTUAL example of the data/program you have and an ACTUAL example of the output you expect or of the type of output you want? If you can't post an example of real data or a real program, then you need to show a program and then give a concrete example of the type of output you want. Saying that you "want to extract the variable rules" doesn't tell anyone whether you want an output dataset, whether you want a report, what is a variable rule, how do you tell a variable rule from any other statement or data. Which of your statements would be considered variable "rules" and why? You said that you had a program, but usually, a program is a complete program. You only showed a partial program. Essentially, you will have to read in the program using an INFILE and INPUT statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; It will be of more help to everyone if you can draft a complete sample question with an example of what you are starting with AND a description of the selection/extraction rules for creating your output AND a description of what type of output you need (dataset or report) .&lt;BR /&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;For example, here's a sample question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table with some information&lt;/P&gt;&lt;P&gt;My Table&lt;/P&gt;&lt;P&gt;---------------&lt;/P&gt;&lt;P&gt;order&amp;nbsp;&amp;nbsp; line&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x=y;&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12345&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *this is a comment;&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p=24;&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *this is the end, this is the end, my friend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I want to extract any line that starts with an asterisk '*'. I need to create a new dataset that contains only these observations. In this data above, my output dataset would look like this:&lt;/P&gt;&lt;P&gt;order&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; line&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *this is a comment;&lt;/P&gt;&lt;P&gt;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *this is the end, this is the end, my friend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; In which case, it would be easy for someone to suggest an example program based on using the INDEX, FIND and/or SUBSTR functions, coupled with the OUTPUT statement. Probably, the program would need an INFILE statement to point to the location of the file and then a INPUT statement to "parse" the lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;data mytable;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; length line $100;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; infile datalines dlm='~' dsd;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; input order line $;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;return;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;datalines4;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;1~x=y;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;2~12345&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;3~*this is a comment;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;4~p=24;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;5~run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;6~*this is the end, this is the end, my friend;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;;;;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;title; footnote;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods html file='c:\temp\before_after.html';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc print data=mytable noobs;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; title '1) Original File';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; var order line;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;data newtable;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; set mytable;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; ** this IF statement could be added to the original program that reads;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; ** in the data. It depends on whether you need to keep a copy of the original;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; if substr(line,1,1) = '*' then output;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc print data=newtable noobs;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; title '2) Extracted Lines';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; var order line;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods html close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2015 13:21:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202994#M306130</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-06-20T13:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Masking sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202995#M306131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your message.&lt;/P&gt;&lt;P&gt;Sorry, if I was not clear in my question. I will try this one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; I can have a sas program with more than 9000 lines of code or more (some times) !!&lt;/P&gt;&lt;P&gt;To resume :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; My input is a sas program with more than 9000 lines of code( you can have the sas proc: sql, iml, print, data set, sas maco, all things, you can get in sas base)&lt;/P&gt;&lt;P&gt;&amp;gt; I want to extract the the rules of the variables in my output( I call it : table target), my variables in the output, they passed by an other tables ( I call these tables : table source)&lt;/P&gt;&lt;P&gt;&amp;gt; I want to have a report likes this :&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="451"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl24" height="17" width="80"&gt;VARIABLE&lt;/TD&gt;&lt;TD class="xl24" style="border-left: none;" width="80"&gt;RULE&lt;/TD&gt;&lt;TD class="xl24" style="border-left: none;" width="132"&gt;TABLE TARGET&lt;/TD&gt;&lt;TD class="xl24" style="border-left: none;" width="159"&gt;TABLE SOURCE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="110" style="border-top: none;"&gt;V&lt;/TD&gt;&lt;TD class="xl26" style="border-top: none; border-left: none;" width="80"&gt;Length V 6 ;&lt;BR /&gt; Format V best32.;&lt;BR /&gt; V=2w+r-2g;&lt;BR /&gt; ......&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;TABTAG1&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;TABSR1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl25" height="17" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD class="xl25" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Note : Yes , I agree with that, we can get the variable in the code, but this does not mean, we have made a modification on the variable( as you show with proc print with your exemple), but i am really interested by the real modification, that can modify the result at the end&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2015 19:43:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202995#M306131</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2015-06-20T19:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Masking sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202996#M306132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm very curious as to why you're doing this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would treat this as a text mining operation to some point, reading in all the code and then separating each section into and individual proc/data step. You can parse each line into individual component using the semicolon as a delimiter and go from there. I'm not sure if searching for the = will capture all variable transformations but I'm not 100% sure what you're after either. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2015 20:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202996#M306132</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-06-20T20:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Masking sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202997#M306133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your interest.&lt;/P&gt;&lt;P&gt;It is intersting for some&amp;nbsp; reasons( technical, domaine, fonctional,..)&lt;/P&gt;&lt;P&gt;Yes, "=" can help, we can not get all rules:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I have some thing likes this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table out1 as&lt;/P&gt;&lt;P&gt;select&amp;nbsp; trt1 as v&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;even with "=", we will have some informations, but , we will not extract in which data, we have make this modification&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data out2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set out1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; v=2w-r;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2015 21:33:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202997#M306133</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2015-06-20T21:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Masking sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202998#M306134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp; It seems to me that you are essentially wanting to duplicate what SAS does at word scanning phase and compile phase, before execution phase. That is a big task. I agree with Reeza -- this is more of a text mining exercise. I would think it would help if you can refine your requirements a bit more. For example it is not clear to me why your LENGTH "rule" is one row on the report, but your FORMAT "rule" has FORMAT V on one line and then has the best32. on the next line. This is inconsistent with the way you represent the "rule" for LENGTH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2015 23:33:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202998#M306134</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-06-20T23:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Masking sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202999#M306135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cynthia&lt;/P&gt;&lt;P&gt;Yes, you're right, &lt;/P&gt;&lt;P&gt;Sorry, I made a mistake, I want like this&amp;nbsp; &lt;/P&gt;&lt;P&gt;Length V 6 ;&lt;/P&gt;&lt;P&gt;Format V best32.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I said before, this exercise has a some reasons( technical, functional, domain)&lt;/P&gt;&lt;P&gt;It is also very intersting to see in the report some thing inconsistent in sas synthax, in domain, in functional&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Jun 2015 00:17:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/202999#M306135</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2015-06-21T00:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Masking sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/203000#M306136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What's domain/functional and an example of inconsistency.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Jun 2015 01:53:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/203000#M306136</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-06-21T01:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Masking sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/203001#M306137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It 's can be any domain,&lt;/P&gt;&lt;P&gt;Let us take an exemple, if you choose the&amp;nbsp; domain XXXX&lt;/P&gt;&lt;P&gt;You define a variable tax : likes this Tax=a*var1+b*var2+var3*omega1&lt;/P&gt;&lt;P&gt;but in other tables: you have :&lt;/P&gt;&lt;P&gt;a*var1+b*var2+zeta3*omega1+epsilon&lt;/P&gt;&lt;P&gt;or a*var1+b*var2+var3*omega1+teta&lt;/P&gt;&lt;P&gt;It is just an exemple.&lt;/P&gt;&lt;P&gt;If we can list the rules of the variable one after one, it is some thing very ineresting because, we will have a good vision for the processus of the creation(or transformation) of the variable in a big program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Jun 2015 13:32:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/203001#M306137</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2015-06-21T13:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Masking sas code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/203002#M306138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What's about sas integration. we can not use it ? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 21:39:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Masking-sas-code/m-p/203002#M306138</guid>
      <dc:creator>LineMoon</dc:creator>
      <dc:date>2015-07-09T21:39:36Z</dc:date>
    </item>
  </channel>
</rss>

