<?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: WRDS MACRO: Beta - I am getting errors in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/856989#M338587</link>
    <description>&lt;P&gt;I have also came across same error you just have to reset the session by pressing F9 key.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2023 05:21:39 GMT</pubDate>
    <dc:creator>OnkarD11</dc:creator>
    <dc:date>2023-02-03T05:21:39Z</dc:date>
    <item>
      <title>WRDS MACRO: Beta - I am getting errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747413#M234579</link>
      <description>&lt;P&gt;Hi everyone, I am using the WRDS MACRO to calculate betas. Please find the code attached below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run this macro on my own (without changing anything) I get the follow errors (please see attached photos). &lt;/P&gt;&lt;P&gt;I am not really sure how to address the notes and errors because it is underlying things I do not see in the original code. Does anyone have any tips on what I could do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-06-11 11_35_45-SAS Studio.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60268i663157B53EADE8CD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2021-06-11 11_35_45-SAS Studio.png" alt="2021-06-11 11_35_45-SAS Studio.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 17:00:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747413#M234579</guid>
      <dc:creator>Mistletoad</dc:creator>
      <dc:date>2021-06-11T17:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: WRDS MACRO: Beta - I am getting errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747415#M234581</link>
      <description>&lt;P&gt;Please&amp;nbsp;&lt;STRONG&gt;COPY/PASTE&amp;nbsp;&lt;/STRONG&gt;the log texts into windows opened with the &amp;lt;/&amp;gt; button. No need for pictures or attachments when the logs are just a handful of lines.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 17:10:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747415#M234581</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-06-11T17:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: WRDS MACRO: Beta - I am getting errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747419#M234585</link>
      <description>&lt;PRE&gt; NOTE: The quoted string currently being processed has become more than 262 
       bytes long.  You might have unbalanced quotation marks.
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 2          TITLE;
 3          FOOTNOTE;
 4          OPTIONS LOCALE=en_US DFLANG=LOCALE;
 5          DATA _NULL_;
 103        &amp;amp;GRAPHTERM; ;*';*";*/;RUN;QUIT;
                          _________________
                          49
 NOTE 49-169: The meaning of an identifier after a quoted string might change in 
              a future SAS release.  Inserting white space between a quoted 
              string and the succeeding identifier is recommended.
 
 6          RUN;
 7          OPTIONS VALIDVARNAME=ANY;
 8          OPTIONS VALIDMEMNAME=EXTEND;
 9          FILENAME _HTMLOUT TEMP;
 10         FILENAME _RTFOUT TEMP ENCODING='UTF-8';
 10         FILENAME _RTFOUT TEMP ENCODING='UTF-8';
                                                 __
                                                 49
 NOTE 49-169: The meaning of an identifier after a quoted string might change in 
              a future SAS release.  Inserting white space between a quoted 
              string and the succeeding identifier is recommended.
 
 11         FILENAME _PDFOUT TEMP;
 12         FILENAME _GSFNAME TEMP;
 13         FILENAME _DATAOUT TEMP;
 14         %LET SYSCC=0;
 15         %LET _CLIENTAPP='SAS Studio';
 16         %LET _CLIENTAPPABREV=Studio;
 17         %LET _CLIENTAPPVERSION=3.81;
 18         %LET _CLIENTVERSION=3.81;
 NOTE: The quoted string currently being processed has become more than 262 
       bytes long.  You might have unbalanced quotation marks.
 19         %LET _CLIENTMODE=basic;
 20         %LET _SASSERVERNAME=%BQUOTE(localhost);
 21         %LET _SASHOSTNAME=%BQUOTE(wrds-sas9-w);
 22         %LET _SASPROGRAMFILEHOST=%BQUOTE(wrds-sas9-w);
 23         %LET _CLIENTUSERID=%BQUOTE(jyuan93);
 24         %LET _CLIENTUSERNAME=%BQUOTE(Jonathan Yuan);
 25         %LET
 25       ! CLIENTMACHINE=%BQUOTE(BRAS-BASE-OKVLON0102W-GRC-48-184-147-218-28.DSL
 25       ! .BELL.CA);
 26         %LET
 26       ! _CLIENTMACHINE=%BQUOTE(BRAS-BASE-OKVLON0102W-GRC-48-184-147-218-28.DS
 26       ! L.BELL.CA);
 27         %let SASWORKLOCATION="%sysfunc(getoption(work))/";
 28         FILENAME _CWD '.'
                            _
                            49
 28       ! ;
 NOTE 49-169: The meaning of an identifier after a quoted string might change in 
              a future SAS release.  Inserting white space between a quoted 
              string and the succeeding identifier is recommended.
 
 29         DATA _NULL_;
 30         CALL SYMPUT('_SASWORKINGDIR',PATHNAME('_CWD'));
                                       ____________
                                       49
 NOTE 49-169: The meaning of an identifier after a quoted string might change in 
              a future SAS release.  Inserting white space between a quoted 
              string and the succeeding identifier is recommended.
 
 31         RUN;
 32         FILENAME _CWD;
 33         
 34         %LET _SASPROGRAMFILE = %NRQUOTE(%NRSTR(/home/uwaterloo/jyuan93/Pilot
 34       ! Test/Beta_test.sas));
 NOTE: The quoted string currently being processed has become more than 262 
       bytes long.  You might have unbalanced quotation marks.
 35         %LET _BASEURL =
 35       ! %BQUOTE(https://wrds-cloud.wharton.upenn.edu/SASStudio/);
 30         CALL SYMPUT('_SASWORKINGDIR',PATHNAME('_CWD'));
                                                       ____
                                                       49
 NOTE 49-169: The meaning of an identifier after a quoted string might change in 
              a future SAS release.  Inserting white space between a quoted 
              string and the succeeding identifier is recommended.
 
 36         %LET _EXECENV=SASStudio;
 37         DATA _NULL_;
 38         CALL SYMPUT("GRAPHINIT","");
 39         CALL SYMPUT("GRAPHTERM","");
 40         RC=TSLVL('SASXGOPT','N');
 41         _ERROR_=0;
 42         IF (RC^=' ') THEN DO;
 43         CALL SYMPUT("GRAPHINIT","GOPTIONS RESET=ALL GSFNAME=_GSFNAME;");
 44         CALL SYMPUT("GRAPHTERM","GOPTIONS NOACCESSIBLE;");
 45         END;
 46         RUN;
 47         DATA _NULL_;
 48         RC=SYSPROD("PRODNUM002");
 49         IF (RC^=1) THEN DO;
 NOTE: The quoted string currently being processed has become more than 262 
       bytes long.  You might have unbalanced quotation marks.
 50         CALL SYMPUT("GRAPHINIT","");
 51         CALL SYMPUT("GRAPHTERM","");
 52         END;
 53         RUN;
 54         %LET _DATAOUT_MIME_TYPE=;
 55         %LET _DATAOUT_NAME=;
 56         %LET _DATAOUT_TABLE=;
 57         %LET _DATAOUT_URL=;
 58         %SYMDEL _DATAOUT_MIME_TYPE _DATAOUT_NAME _DATAOUT_URL _DATAOUT_TABLE;
 59         %LET _SASWS_ = %BQUOTE(/home/uwaterloo/jyuan93);
 42         IF (RC^=' ') THEN DO;
                      ___________
                      49
 NOTE 49-169: The meaning of an identifier after a quoted string might change in 
              a future SAS release.  Inserting white space between a quoted 
              string and the succeeding identifier is recommended.
 
 60         %LET
 60       ! _SASWSTEMP_=%BQUOTE(/home/uwaterloo/jyuan93/.sasstudio/.images/5ed268
 60       ! 7e-4d7d-4a1e-b927-02d7b8ddf5eb);
 61         ODS LISTING CLOSE;
 62         ODS AUTONAVIGATE OFF;
 63         ODS GRAPHICS ON;
 64         ODS HTML5 (ID=WEB) DEVICE=PNG GPATH="&amp;amp;_SASWSTEMP_" ENCODING=utf8
 64       ! FILE=_HTMLOUT (TITLE='Results:
 64       ! Beta_test.sas') STYLE=Htmlblue OPTIONS(BITMAP_MODE='INLINE'
                         _______________________________________      ___________
 ____________                                                                    
                         49                                           49
 49
 64       ! OUTLINE='ON' SVG_MODE='INLINE'
 64       ! CSS_PREFIX='.ods_5ed2687e-4d7d-4a1e-b927-02d7b8ddf5eb'
 64       ! BODY_ID='div_5ed2687e-4d7d-4a1e-b927-02d7b8ddf5eb' );
 NOTE 49-169: The meaning of an identifier after a quoted string might change in 
              a future SAS release.  Inserting white space between a quoted 
              string and the succeeding identifier is recommended.
 
 65         ODS RTF (ID=WEB) STYLE=Rtf FILE=_RTFOUT sasdate;
 66         ODS PDF (ID=WEB) STYLE=Pearl FILE=_PDFOUT;
 67         &amp;amp;GRAPHINIT;
 68         OPTIONS FIRSTOBS=1;
 69         OPTIONS OBS=MAX;
 NOTE: The quoted string currently being processed has become more than 262 
       bytes long.  You might have unbalanced quotation marks.
 70         OPTIONS DTRESET DATE NUMBER NOTES;
 71         OPTIONS NOTES STIMER SOURCE NOSYNTAXCHECK;
 72         
 73         proc printto log = junk; run;
 74         proc expand data=_crsp2 out=_crsp3 method=none;
 75         by permno;
 76         id date;
 77         convert X=X2      / transformout= (MOVUSS &amp;amp;WINDOW.);
 78         convert X=X       / transformout= (MOVSUM &amp;amp;WINDOW.);
 79         convert XY=XY     / transformout= (MOVSUM &amp;amp;WINDOW.);
 80         convert ret=Y     / transformout= (MOVSUM &amp;amp;WINDOW.);
 81         convert count=n   / transformout= (MOVSUM &amp;amp;WINDOW.);
 82         quit;
 83         run;
 84         proc printto; run;
 85         
 86         data &amp;amp;outset;
 87         set _crsp3;
 88         if n&amp;gt;=&amp;amp;MINWIN. then beta=(XY-X*Y/n) / (X2-(X**2)/n);
 89         label beta = "Stock Beta";
 90         label n = "Number of Observations used to compute Beta";
 91         drop X X2 XY Y COUNT;
 92         format beta comma8.2 ret &amp;amp;index percentn8.2;
 93         run;
 94         
 95         /* House Cleaning */
 96         proc sql;
 97         drop view _crsp1;
 98         drop table _crsp2, _crsp3;
 99         quit;
 100        
 101        options notes;
 102        %put #### DONE . Dataset &amp;amp;outset. Created! ;    %put ;
 103        
 104        %MEND BETA;
 105        
 106        
 107        OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 108        ODS HTML CLOSE;
 109        &amp;amp;GRAPHTERM; ;*';*";*/;RUN;QUIT;
 110        QUIT;RUN;
 111        ODS HTML5 (ID=WEB) CLOSE;
 112        
 113        ODS RTF (ID=WEB) CLOSE;
 114        ODS PDF (ID=WEB) CLOSE;
 115        FILENAME _GSFNAME;
 116        DATA _NULL_;
 117        RUN;
 118        OPTIONS NOTES STIMER SOURCE SYNTAXCHECK;
 119        &lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Jun 2021 17:13:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747419#M234585</guid>
      <dc:creator>Mistletoad</dc:creator>
      <dc:date>2021-06-11T17:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: WRDS MACRO: Beta - I am getting errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747420#M234586</link>
      <description>&lt;P&gt;You have had unbalanced single quotes somewhere in the code you submitted earlier. Close the SAS session and start a new one.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 17:15:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747420#M234586</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-06-11T17:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: WRDS MACRO: Beta - I am getting errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747424#M234588</link>
      <description>&lt;P&gt;Hey KurtBremser, thanks for the help.&lt;/P&gt;&lt;P&gt;I went through the code and I actually dont have any single quotes. Plus, the double quotations looked balanced.&lt;/P&gt;&lt;P&gt;I restarted SAS and the error seems to persist.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 17:27:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747424#M234588</guid>
      <dc:creator>Mistletoad</dc:creator>
      <dc:date>2021-06-11T17:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: WRDS MACRO: Beta - I am getting errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747455#M234594</link>
      <description>It looks like it may be due to some autocode that WRDS is doing but your code doesn't actually show any errors. But I also see a %MEND and no %MACRO or macro call so I think you copied and pasted wrong as well - missing some code.</description>
      <pubDate>Fri, 11 Jun 2021 17:57:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747455#M234594</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-06-11T17:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: WRDS MACRO: Beta - I am getting errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747459#M234597</link>
      <description>&lt;P&gt;Hey Reeza, I doubled checked and the code is copied correctly.&lt;/P&gt;&lt;P&gt;However, is there something I can add that may help the code work?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 18:10:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747459#M234597</guid>
      <dc:creator>Mistletoad</dc:creator>
      <dc:date>2021-06-11T18:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: WRDS MACRO: Beta - I am getting errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747465#M234600</link>
      <description>Can you post the log from a new session with what you think is the full code because this does not look like full code. As I mentioned, %macro/%mend always go together and you have a %MEND but no %MACRO to start your code something is very off.</description>
      <pubDate>Fri, 11 Jun 2021 18:46:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747465#M234600</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-06-11T18:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: WRDS MACRO: Beta - I am getting errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747466#M234601</link>
      <description>&lt;P&gt;If you're not famililar with macros here's a beginner level tutorial.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;UCLA introductory tutorial on macro variables and macros&lt;BR /&gt;&lt;A href="https://stats.idre.ucla.edu/sas/seminars/sas-macros-introduction/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/seminars/sas-macros-introduction/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 18:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/747466#M234601</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-06-11T18:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: WRDS MACRO: Beta - I am getting errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/856798#M338526</link>
      <description>&lt;P&gt;Hi! I frequently encounter this kind of error whenever I have unbalanced quotes or accidentally run a SAS macro without the %mend statement. Once I fixed my code, I was just wondering if there's a way to continue working on the same session and not start a new one? There are times when I have so many data on my work library that it would take too much of my time to open a new session and rerun all my codes.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 09:04:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/856798#M338526</guid>
      <dc:creator>albertsamaniego</dc:creator>
      <dc:date>2023-02-02T09:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: WRDS MACRO: Beta - I am getting errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/856865#M338548</link>
      <description>&lt;P&gt;EG generally fixes unmatched quotes by submitting a "magic string".&amp;nbsp; You can also try submitting one yourself, e.g. submit:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;;*';*";*/;RUN;QUIT;%mend;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I tend to submit it a few times.&amp;nbsp; If the %mend at the end generates an error, then it's a clue that your session is un-stuck.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 15:34:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/856865#M338548</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-02-02T15:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: WRDS MACRO: Beta - I am getting errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/856989#M338587</link>
      <description>&lt;P&gt;I have also came across same error you just have to reset the session by pressing F9 key.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 05:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/WRDS-MACRO-Beta-I-am-getting-errors/m-p/856989#M338587</guid>
      <dc:creator>OnkarD11</dc:creator>
      <dc:date>2023-02-03T05:21:39Z</dc:date>
    </item>
  </channel>
</rss>

