<?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: Recording a Macro - Could you paste in code insted of manually writing it? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Recording-a-Macro-Could-you-paste-in-code-insted-of-manually/m-p/748979#M235292</link>
    <description>&lt;P&gt;In Enterprise Guide, go to:&amp;nbsp;&lt;BR /&gt;Program &amp;gt; Manage macros and snippets. There you can for instance also assign keyboard shortcuts.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Jun 2021 19:11:29 GMT</pubDate>
    <dc:creator>SasStatistics</dc:creator>
    <dc:date>2021-06-18T19:11:29Z</dc:date>
    <item>
      <title>Recording a Macro - Could you paste in code insted of manually writing it?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recording-a-Macro-Could-you-paste-in-code-insted-of-manually/m-p/748536#M235079</link>
      <description>&lt;P&gt;In SAS (Atleast SAS Enteprise Guide), it is possible to &lt;STRONG&gt;record&lt;/STRONG&gt; Macros and assign keys. When recording Macros, you have to manually write down the code you want to store.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So for example, I could record a Macro and assign it a key so that when I press Ctrl + 1&amp;nbsp; (I chose that keyboard shortcut), the following text appears:&amp;nbsp;&lt;BR /&gt;"This is My Macro That I recorded".&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I was thinking, that it should (?) be possible to just paste in the text&amp;nbsp;"This is My Macro That I recorded" (instead of having to write it manually) and then assign it a keyboard shortcut such as Ctrl + 1, this would be very handy if my Macro recording for instance contains 50 rows of code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Any ideas?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 19:32:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recording-a-Macro-Could-you-paste-in-code-insted-of-manually/m-p/748536#M235079</guid>
      <dc:creator>SasStatistics</dc:creator>
      <dc:date>2021-06-16T19:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Recording a Macro - Could you paste in code insted of manually writing it?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recording-a-Macro-Could-you-paste-in-code-insted-of-manually/m-p/748547#M235083</link>
      <description>&lt;P&gt;If you look at the actual keyboard macro you will likely see what that isn't likely to fly. I don't use EG but the older Display manager would let you use the Tools&amp;gt;Keyboard macros&amp;gt;macros menu to bring up a window with your macros. Then you could highlight a macro and select edit to see the actual macro. For macros that insert text you would see:&lt;/P&gt;
&lt;P&gt;Insert character ('d')&lt;/P&gt;
&lt;P&gt;Insert character ('a')&lt;/P&gt;
&lt;P&gt;Insert character ('t')&lt;/P&gt;
&lt;P&gt;Insert character ('a')&lt;/P&gt;
&lt;P&gt;where the word "data" was to appear. Plus "insert carriage return" for the next line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So editing keyboard macros as you suggest is probably not where you want to be. Look at custom tasks or code snippet tools.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 19:56:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recording-a-Macro-Could-you-paste-in-code-insted-of-manually/m-p/748547#M235083</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-06-16T19:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Recording a Macro - Could you paste in code insted of manually writing it?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recording-a-Macro-Could-you-paste-in-code-insted-of-manually/m-p/748625#M235118</link>
      <description>&lt;P&gt;Thanks ballardw. Do you know if it then is possible to "create a keyboard shortcut" that simply writes out the following: &lt;BR /&gt;&lt;BR /&gt;"This is my Code that I have put as a Keyboard shortcut" ? &lt;BR /&gt;&lt;BR /&gt;Code snippets seems to be a solution, but reading the documentation it only works for SAS Studio: &lt;EM&gt;"Code snippets enable you to quickly insert SAS code into your program and customize it to meet your needs."&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Code snippets exactly does what I would like, as demonstrated by the picture (you can insert SAS code automatically):&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SasStatistics_0-1623915980478.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60443iF0275EEB98766F23/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SasStatistics_0-1623915980478.png" alt="SasStatistics_0-1623915980478.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Source:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/webeditorcdc/3.7/webeditorug/n002bgjjez3z63n16y88kjsobrha.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/webeditorcdc/3.7/webeditorug/n002bgjjez3z63n16y88kjsobrha.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 07:47:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recording-a-Macro-Could-you-paste-in-code-insted-of-manually/m-p/748625#M235118</guid>
      <dc:creator>SasStatistics</dc:creator>
      <dc:date>2021-06-17T07:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Recording a Macro - Could you paste in code insted of manually writing it?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recording-a-Macro-Could-you-paste-in-code-insted-of-manually/m-p/748634#M235122</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/381436"&gt;@SasStatistics&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the purpose of your (Enhanced Editor) macro is just to write constant text, it's easier to create it as follows than to record it:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;In SAS EG open a Program window.&lt;/LI&gt;
&lt;LI&gt;From the menu select Program&amp;nbsp;→ Editor Macros&amp;nbsp;→ Macros.&lt;/LI&gt;
&lt;LI&gt;Click "Create...".&lt;/LI&gt;
&lt;LI&gt;Enter a keyboard macro name (and, optionally, a keyboard macro description).&lt;/LI&gt;
&lt;LI&gt;From command category "Edit" select "Insert a string".&lt;/LI&gt;
&lt;LI&gt;Press the arrow button in the middle of the "Create Keyboard Macro" dialog. This opens the "Insert String" dialog window.&lt;/LI&gt;
&lt;LI&gt;Paste your text into that window and confirm with OK.&lt;/LI&gt;
&lt;LI&gt;Click "OK" in the "Create Keyboard Macro" dialog.&lt;/LI&gt;
&lt;LI&gt;Click "Assign keys..." to assign a shortcut key as usual.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(In the traditional Display Manager interface it's the same procedure except that the menu items are Tools&amp;nbsp;→ Keyboard Macros&amp;nbsp;→ Macros... .)&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 08:05:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recording-a-Macro-Could-you-paste-in-code-insted-of-manually/m-p/748634#M235122</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-06-17T08:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Recording a Macro - Could you paste in code insted of manually writing it?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recording-a-Macro-Could-you-paste-in-code-insted-of-manually/m-p/748979#M235292</link>
      <description>&lt;P&gt;In Enterprise Guide, go to:&amp;nbsp;&lt;BR /&gt;Program &amp;gt; Manage macros and snippets. There you can for instance also assign keyboard shortcuts.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 19:11:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recording-a-Macro-Could-you-paste-in-code-insted-of-manually/m-p/748979#M235292</guid>
      <dc:creator>SasStatistics</dc:creator>
      <dc:date>2021-06-18T19:11:29Z</dc:date>
    </item>
  </channel>
</rss>

