<?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: Proc ODStext error and weird behaviour in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-ODStext-error-and-weird-behaviour/m-p/555953#M154793</link>
    <description>&lt;P&gt;Your particular error is going to be related to something prior to the Proc ODStext.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look closely at the log above that error for something that didn't finish as expected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My suspicion is that the proc export or the filename outbox may have an issue, but that's guess.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 May 2019 14:55:39 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-05-03T14:55:39Z</dc:date>
    <item>
      <title>Proc ODStext error and weird behaviour</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-ODStext-error-and-weird-behaviour/m-p/555906#M154772</link>
      <description>&lt;P&gt;Hi all. I'm using the below very simple code in order to send an email from SAS EG with an attached file. However, I receive this error from the log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;195 p "Check this.";&lt;BR /&gt;_&lt;BR /&gt;180&lt;/P&gt;&lt;P&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which I do not understand at all as the "p" is a key element in the proc odstext structure. Also, other proc odstext codes, which are running perfectly in other program, just within this one get the same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems really really weird that just within this code I'm getting this error. Any hint or suggestion about what could be the reason behind?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bests (code syntax below)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
drop table lead_forum ;
quit;

proc sql;
create table lead_forum as
select
ACCOUNT_NAME,

RION_CONTACT_ID,
full_name,
INTERACTION_STATUS,
STANDARDIZED_JOB_TITLE,

TSR_OWNER_NAME,

primary_email,
optin_indicator,
OPTIN_DATE

from rion_interaction a
left join rion_contact b on a.orion_contact_id=b.orion_contact_id
left join rion_account c on b.orion_account_id=c.orion_account_id
left join emailoptin d on b.primary_email=d.email

where interaction_id=3147030

order by rion_contact_id;
quit;


data counter (where=(count&amp;gt;1));
set lead_forum;
count+1;
by rion_contact_id;
if first.rion_contact_id then count=1;
run;


proc sql;
select count(rion_contact_id) into:N

from counter;
quit;


%macro check_phase1;

%if &amp;amp;N&amp;gt;0 %then %do;

%put %str(ER)ROR: Duplicates in orion_contacts .;

%end;

%mend;


%check_phase1;




proc export 
data=lead_forum
dbms=dlm
outfile="~/Lead_Forum_contact_BX.csv"
replace;
delimiter=";"
;
run;


proc template;

define style styles.purple;
parent=styles.sasweb;
class Header /
background=purple
foreground=white;
end;


%let today=%sysfunc(today(),date9.);
%put &amp;amp;today;

filename outbox email ""

TO=("" *)


FROM=("")

subject="Interactions Forum BX. Date : &amp;amp;today"

attach=("~/Lead_Forum_contact_BX.csv"
content_type="application/docx")

lrecl=256 
type="TEXT/HTML";

options nocenter;
ods MSOFFICE2k body=outbox style=minimal;
OPTIONS SPOOL; 
ods escapechar='^';

proc odstext;
p "Check this.";
run;

ods _all_ close;

filename outbox clear;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 12:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-ODStext-error-and-weird-behaviour/m-p/555906#M154772</guid>
      <dc:creator>dcortell</dc:creator>
      <dc:date>2019-05-03T12:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Proc ODStext error and weird behaviour</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-ODStext-error-and-weird-behaviour/m-p/555953#M154793</link>
      <description>&lt;P&gt;Your particular error is going to be related to something prior to the Proc ODStext.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look closely at the log above that error for something that didn't finish as expected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My suspicion is that the proc export or the filename outbox may have an issue, but that's guess.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 14:55:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-ODStext-error-and-weird-behaviour/m-p/555953#M154793</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-05-03T14:55:39Z</dc:date>
    </item>
  </channel>
</rss>

