<?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 PROC PWENCODE authorization issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-PWENCODE-authorization-issue/m-p/945856#M370499</link>
    <description>&lt;P&gt;I am trying to send email from SAS and everything is working fine and as intended when I type my actual pwd in the SAS code using EMAILPW = option. Since I do not want to use my actual pwd in the program, I created an encoded pwd using PWENCODE procedure and stored it in the file with name 'pwfile'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Here is the first code to create the encoded pwd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename pwfile 'Z:\Private\pwd\pwfile.txt';&lt;BR /&gt;proc pwencode in='pwd' out=pwfile;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I am using code below to use this encoded pwd but I keep on getting login failure error.&amp;nbsp; Basically, SAS is not recognizing the encoded pwd correctly (as intended).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the second part for email.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;filename pwfile&lt;/DIV&gt;&lt;DIV&gt;'Z:\Private\pwd\pwfile.txt';&lt;/DIV&gt;&lt;DIV&gt;options symbolgen;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;data _null_;&lt;/DIV&gt;&lt;DIV&gt;infile pwfile truncover;&lt;/DIV&gt;&lt;DIV&gt;input line :$64.;&lt;/DIV&gt;&lt;DIV&gt;call symputx('dbpass',line);&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;options&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; emailsys=smtp&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; emailauthprotocol= plain&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; emailid = 'user@xyz.com'&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; emailhost='smtp.office365.com'&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; emailpw = "&amp;amp;dbpass"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; emailport=587&lt;/DIV&gt;&lt;DIV&gt;;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;options emailhost=&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;(&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;'smtp.office365.com'&amp;nbsp; port=587&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;STARTTLS&amp;nbsp; auth=login&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;id='user@xyz.com'&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pw="&amp;amp;dbpass"&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;)&lt;/DIV&gt;&lt;DIV&gt;;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;/* Send email */&lt;/DIV&gt;&lt;DIV&gt;filename mymail email&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; to="user@xyz.com"&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;attach = "Z:\Private\pwd\test.docx"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; subject="test";&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;data _null_;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; file mymail;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; put "this is test email";&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;filename mymail clear;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please provide any suggestions to correct this error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Oct 2024 00:15:39 GMT</pubDate>
    <dc:creator>Leo9</dc:creator>
    <dc:date>2024-10-02T00:15:39Z</dc:date>
    <item>
      <title>PROC PWENCODE authorization issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PWENCODE-authorization-issue/m-p/945856#M370499</link>
      <description>&lt;P&gt;I am trying to send email from SAS and everything is working fine and as intended when I type my actual pwd in the SAS code using EMAILPW = option. Since I do not want to use my actual pwd in the program, I created an encoded pwd using PWENCODE procedure and stored it in the file with name 'pwfile'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Here is the first code to create the encoded pwd&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename pwfile 'Z:\Private\pwd\pwfile.txt';&lt;BR /&gt;proc pwencode in='pwd' out=pwfile;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I am using code below to use this encoded pwd but I keep on getting login failure error.&amp;nbsp; Basically, SAS is not recognizing the encoded pwd correctly (as intended).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the second part for email.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;filename pwfile&lt;/DIV&gt;&lt;DIV&gt;'Z:\Private\pwd\pwfile.txt';&lt;/DIV&gt;&lt;DIV&gt;options symbolgen;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;data _null_;&lt;/DIV&gt;&lt;DIV&gt;infile pwfile truncover;&lt;/DIV&gt;&lt;DIV&gt;input line :$64.;&lt;/DIV&gt;&lt;DIV&gt;call symputx('dbpass',line);&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;options&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; emailsys=smtp&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; emailauthprotocol= plain&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; emailid = 'user@xyz.com'&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; emailhost='smtp.office365.com'&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; emailpw = "&amp;amp;dbpass"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; emailport=587&lt;/DIV&gt;&lt;DIV&gt;;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;options emailhost=&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;(&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;'smtp.office365.com'&amp;nbsp; port=587&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;STARTTLS&amp;nbsp; auth=login&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;id='user@xyz.com'&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pw="&amp;amp;dbpass"&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;)&lt;/DIV&gt;&lt;DIV&gt;;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;/* Send email */&lt;/DIV&gt;&lt;DIV&gt;filename mymail email&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; to="user@xyz.com"&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;attach = "Z:\Private\pwd\test.docx"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; subject="test";&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;data _null_;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; file mymail;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; put "this is test email";&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;filename mymail clear;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please provide any suggestions to correct this error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 00:15:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PWENCODE-authorization-issue/m-p/945856#M370499</guid>
      <dc:creator>Leo9</dc:creator>
      <dc:date>2024-10-02T00:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PWENCODE authorization issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PWENCODE-authorization-issue/m-p/945871#M370505</link>
      <description>&lt;P&gt;For debugging purposes:&lt;BR /&gt;1: Run your program with code as simple as possible using your clear text password. Once that works:&lt;/P&gt;
&lt;P&gt;2: Only replace the clear text password with the encoded version (not passed via a macro variable) and run again. Does this work or already fail?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 03:14:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PWENCODE-authorization-issue/m-p/945871#M370505</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-10-02T03:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PWENCODE authorization issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-PWENCODE-authorization-issue/m-p/945891#M370506</link>
      <description>Instead of taking the detour through an external file, use the automatic macro variable _PWENCODE in your EMAILPW option. And do not use quotes around it.</description>
      <pubDate>Wed, 02 Oct 2024 07:08:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-PWENCODE-authorization-issue/m-p/945891#M370506</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-10-02T07:08:45Z</dc:date>
    </item>
  </channel>
</rss>

