<?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 How can one remove extra EG code from exported code files in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-one-remove-extra-EG-code-from-exported-code-files/m-p/516755#M32604</link>
    <description>&lt;P&gt;I think I've read someone suggest SED script without posting a script.&amp;nbsp;Are there any other ideas?&amp;nbsp; I am familiar with SED, but I'm failing to make it work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to process a set of files and remove the line with "GOPTIONS ACCESSIBLE;" and all lines before, as well as&amp;nbsp;the line with "GOPTIONS NOACCESSIBLE;" and all lines after.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* ----------------------------------------
Code exported from SAS Enterprise Guide
DATE: Wednesday, November 28, 2018     TIME: 10:33:05 AM

/*... blah blah...*/

GOPTIONS ACCESSIBLE;

/* ***************************** */
/* My Code, which I want to keep */
/* ***************************** */
%Macro Table_Lookup(command,result);
  /* etc. etc. */
%mend;

GOPTIONS NOACCESSIBLE;
%LET _CLIENTTASKLABEL=;
/*... blah blah...*/&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 24 Sep 2020 15:27:13 GMT</pubDate>
    <dc:creator>PhilC</dc:creator>
    <dc:date>2020-09-24T15:27:13Z</dc:date>
    <item>
      <title>How can one remove extra EG code from exported code files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-one-remove-extra-EG-code-from-exported-code-files/m-p/516755#M32604</link>
      <description>&lt;P&gt;I think I've read someone suggest SED script without posting a script.&amp;nbsp;Are there any other ideas?&amp;nbsp; I am familiar with SED, but I'm failing to make it work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to process a set of files and remove the line with "GOPTIONS ACCESSIBLE;" and all lines before, as well as&amp;nbsp;the line with "GOPTIONS NOACCESSIBLE;" and all lines after.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* ----------------------------------------
Code exported from SAS Enterprise Guide
DATE: Wednesday, November 28, 2018     TIME: 10:33:05 AM

/*... blah blah...*/

GOPTIONS ACCESSIBLE;

/* ***************************** */
/* My Code, which I want to keep */
/* ***************************** */
%Macro Table_Lookup(command,result);
  /* etc. etc. */
%mend;

GOPTIONS NOACCESSIBLE;
%LET _CLIENTTASKLABEL=;
/*... blah blah...*/&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Sep 2020 15:27:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-one-remove-extra-EG-code-from-exported-code-files/m-p/516755#M32604</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2020-09-24T15:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can one remove extra EG code from exported code files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-one-remove-extra-EG-code-from-exported-code-files/m-p/516795#M32605</link>
      <description>&lt;P&gt;Ok I figured it out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Removes the header defined by the last line which is a match for "STRING IN THE LAST LINE OF THE HEADER" and the footer defined by the first string which is a match to "&lt;SPAN style="background-color: transparent; box-sizing: border-box; color: #333333; cursor: text; display: inline; float: none; font-family: Arial,Helvetica,sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 27.42px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;STRING IN THE BEGINNING OF THE FOOTER&lt;/SPAN&gt;".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Its up to the user to find appropriate and unique match strings to make this work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;/&lt;SPAN style="background-color: transparent; box-sizing: border-box; color: #333333; cursor: text; display: inline; float: none; font-family: Arial,Helvetica,sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 27.42px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;STRING IN THE LAST LINE OF THE HEADER&lt;/SPAN&gt;/h&lt;BR /&gt;/&lt;SPAN style="background-color: transparent; box-sizing: border-box; color: #333333; cursor: text; display: inline; float: none; font-family: Arial,Helvetica,sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 27.42px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;STRING IN THE BEGINNING OF THE FOOTER&lt;/SPAN&gt;/bbeginprint &lt;BR /&gt;x&lt;BR /&gt;/&lt;SPAN style="background-color: transparent; box-sizing: border-box; color: #333333; cursor: text; display: inline; float: none; font-family: Arial,Helvetica,sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 27.42px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;STRING IN THE BEGINNING OF THE FOOTER&lt;/SPAN&gt;/bprint&lt;BR /&gt;d&lt;BR /&gt;:print&lt;BR /&gt;x&lt;BR /&gt;p&lt;BR /&gt;d&lt;BR /&gt;:beginprint&lt;BR /&gt;h&lt;BR /&gt;d&lt;/PRE&gt;
&lt;P&gt;Using sed command line:&lt;/P&gt;
&lt;PRE&gt;sed -i -n -f "script file_name.sed" "file name.sas"&lt;/PRE&gt;
&lt;P&gt;The SED version I am using is&amp;nbsp;GNU SED version 4.2.1, on Windows 10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 16:23:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-can-one-remove-extra-EG-code-from-exported-code-files/m-p/516795#M32605</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2020-08-25T16:23:26Z</dc:date>
    </item>
  </channel>
</rss>

