<?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: Writing code to call pdmix800 and code to run it in proc mixed. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Writing-code-to-call-pdmix800-and-code-to-run-it-in-proc-mixed/m-p/899738#M355594</link>
    <description>&lt;P&gt;Before you can use a macro such as that you have to compile the macro code to make it available in the current session (unless it is one of the macro functions SAS supplies).&lt;/P&gt;
&lt;P&gt;That means you need the code that starts with&lt;/P&gt;
&lt;P&gt;%macro pdmix80(&amp;lt;typically parameter list goes here&amp;gt;)&lt;/P&gt;
&lt;P&gt;&amp;lt;code&amp;gt;&lt;/P&gt;
&lt;P&gt;%mend;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have to compile that code by submitting it before calling the macro. Then the macro would be available for "invocation".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the %macro / %mend is not in your current program you can reference the file by use of&lt;/P&gt;
&lt;P&gt;%include &amp;lt;path&amp;gt;\pdmix800.sas;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;%include is an instruction to use text from a file as part of the current program. This would have to appear before your invocation of the macro.&lt;/P&gt;
&lt;P&gt;You would have to make sure that your studio session sees that file which may mean uploading the code to the server running SAS Studio, probably best to your "/home/mabeg510/PD folder" where that folder would be the Path part.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Oct 2023 09:54:05 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-10-24T09:54:05Z</dc:date>
    <item>
      <title>Writing code to call pdmix800 and code to run it in proc mixed.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-code-to-call-pdmix800-and-code-to-run-it-in-proc-mixed/m-p/899731#M355589</link>
      <description>&lt;P&gt;I am trying to use pdmix800.sas &lt;SPAN&gt;in order to generate letter displays of pairwise mean comparisons in proc mixed?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Previously I was running SAS studio on my computer. I had a pdmix800.sas macros file stored locally on my computer and I was running and getting results correctly.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now I am using SAS studio on cloud (remote) and I was not able to call the macros file. I searched the SAS community,&amp;nbsp;and it seemed to me to create a library for the macros file in my cloud account (I am not sure if this is the correct way). I did that and I gave a path to it in the editor. But the code is not giving me an output for letter displays.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am appreciating all help in this for the correct code!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This the code I have written in the editor:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort; by group;&lt;BR /&gt;proc mixed; by group;&lt;BR /&gt;class buff time;&lt;BR /&gt;model e=time;&lt;BR /&gt;random buff;&lt;BR /&gt;repeated time / type=AR(1) sub=buff;&lt;BR /&gt;lsmeans time / diff;&lt;/P&gt;&lt;P&gt;ODS LISTING;&lt;BR /&gt;ods output diffs=ppp lsmeans=mmm;&lt;BR /&gt;ods listing exclude diffs lsmeans;&lt;BR /&gt;run;&lt;BR /&gt;LIBNAME mydata "/home/mabeg510/PD folder";&lt;BR /&gt;%pdmix800(ppp,mmm,alpha=.05,sort=no);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the log file I am getting:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;143 LIBNAME mydata "/home/mabeg510/PD folder";&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: Libref MYDATA was successfully assigned as follows:&lt;/DIV&gt;&lt;DIV class=""&gt;Engine: V9&lt;/DIV&gt;&lt;DIV class=""&gt;Physical Name: /home/mabeg510/PD folder&lt;/DIV&gt;&lt;DIV class=""&gt;WARNING: Apparent invocation of macro PDMIX800 not resolved.&lt;/DIV&gt;&lt;DIV class=""&gt;144 %pdmix800(ppp,mmm,alpha=.05,sort=no);&lt;/DIV&gt;&lt;DIV class=""&gt;_&lt;/DIV&gt;&lt;DIV class=""&gt;180&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;145&lt;/DIV&gt;&lt;DIV class=""&gt;146 run;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 08:55:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-code-to-call-pdmix800-and-code-to-run-it-in-proc-mixed/m-p/899731#M355589</guid>
      <dc:creator>mabeg510</dc:creator>
      <dc:date>2023-10-24T08:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Writing code to call pdmix800 and code to run it in proc mixed.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-code-to-call-pdmix800-and-code-to-run-it-in-proc-mixed/m-p/899738#M355594</link>
      <description>&lt;P&gt;Before you can use a macro such as that you have to compile the macro code to make it available in the current session (unless it is one of the macro functions SAS supplies).&lt;/P&gt;
&lt;P&gt;That means you need the code that starts with&lt;/P&gt;
&lt;P&gt;%macro pdmix80(&amp;lt;typically parameter list goes here&amp;gt;)&lt;/P&gt;
&lt;P&gt;&amp;lt;code&amp;gt;&lt;/P&gt;
&lt;P&gt;%mend;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have to compile that code by submitting it before calling the macro. Then the macro would be available for "invocation".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the %macro / %mend is not in your current program you can reference the file by use of&lt;/P&gt;
&lt;P&gt;%include &amp;lt;path&amp;gt;\pdmix800.sas;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;%include is an instruction to use text from a file as part of the current program. This would have to appear before your invocation of the macro.&lt;/P&gt;
&lt;P&gt;You would have to make sure that your studio session sees that file which may mean uploading the code to the server running SAS Studio, probably best to your "/home/mabeg510/PD folder" where that folder would be the Path part.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 09:54:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-code-to-call-pdmix800-and-code-to-run-it-in-proc-mixed/m-p/899738#M355594</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-10-24T09:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Writing code to call pdmix800 and code to run it in proc mixed.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Writing-code-to-call-pdmix800-and-code-to-run-it-in-proc-mixed/m-p/899759#M355605</link>
      <description>Dear ballardw,&lt;BR /&gt;Thank you so much for helping!&lt;BR /&gt;Cheers&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Oct 2023 11:22:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Writing-code-to-call-pdmix800-and-code-to-run-it-in-proc-mixed/m-p/899759#M355605</guid>
      <dc:creator>mabeg510</dc:creator>
      <dc:date>2023-10-24T11:22:47Z</dc:date>
    </item>
  </channel>
</rss>

