<?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: Please help me to retrieve password from unix command line using SAS in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Please-help-me-to-retrieve-password-from-unix-command-line-using/m-p/881684#M39104</link>
    <description>&lt;P&gt;Try 2 is the best method. Expand it like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename tmp pipe '/opt/software/dbclients/CyberArk/cark_getpwd.ksh -a XXX -s XXX -o XXX 2&amp;gt;&amp;amp;1';

data want;
length return_string $2000;
infile tmp;
input return_string $;
put return_string=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The 2&amp;gt;&amp;amp;1 redirects stderr to stdout, so that&amp;nbsp;&lt;EM&gt;all&lt;/EM&gt; messages will appear in the SAS log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But this:&lt;/P&gt;
&lt;PRE&gt;/opt/software/dbclients/CyberArk/cark_getpwd.ksh[23]: /opt/CARKaim/sdk/clipasswordsdk not found&lt;/PRE&gt;
&lt;P&gt;indicates that there is a problem locating a library or module needed for the command to work. Look at line 23 of the shell script.&lt;/P&gt;
&lt;P&gt;Make sure that your direct and SAS attempt to run the command are executed in the same environment:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;same server&lt;/LI&gt;
&lt;LI&gt;same user&lt;/LI&gt;
&lt;LI&gt;same settings in environment variables (e.g. PATH, LIBPATH)&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Wed, 21 Jun 2023 11:39:24 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2023-06-21T11:39:24Z</dc:date>
    <item>
      <title>Please help me to retrieve password from unix command line using SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Please-help-me-to-retrieve-password-from-unix-command-line-using/m-p/881669#M39103</link>
      <description>&lt;P&gt;&lt;BR /&gt;I can able to retrieve password from using below command from unix . I am trying to achieve the same using SAS&lt;BR /&gt;/* Try 1*/&lt;BR /&gt;systask command '/opt/software/dbclients/CyberArk/cark_getpwd.ksh -a XXX -s XXX -o XXX'&lt;BR /&gt;status=passwd;&lt;BR /&gt;%put &amp;amp;passwd. &amp;amp;sysrc.;&lt;BR /&gt;result :&lt;BR /&gt;&amp;amp;passwd. blank &amp;amp;sysrc. is 0&lt;BR /&gt;/* Try 2 */&lt;/P&gt;&lt;P&gt;filename tmp pipe '/opt/software/dbclients/CyberArk/cark_getpwd.ksh -a XXX -s XXX -o XXX';&lt;BR /&gt;data want;&lt;BR /&gt;length return_string $2000;&lt;BR /&gt;infile tmp;&lt;BR /&gt;input return_string $;&lt;BR /&gt;put return_string=;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;result :&amp;nbsp; return_string=/opt/software/dbclients/CyberArk/cark_getpwd.ksh[23]:&amp;nbsp;/opt/CARKaim/sdk/clipasswordsdk not found&lt;/P&gt;&lt;P&gt;/* try 3*/&lt;/P&gt;&lt;P&gt;%macro pwdls;&lt;/P&gt;&lt;P&gt;%sysexec %str(/opt/software/dbclients/CyberArk/cark_getpwd.ksh -a XXX -s XXX -o XXX);&lt;/P&gt;&lt;P&gt;%mend pwdls;&lt;BR /&gt;%pwdls;&lt;BR /&gt;/* try 4*/&amp;nbsp;&lt;BR /&gt;%let a=%sysexec %str(/opt/software/dbclients/CyberArk/cark_getpwd.ksh -a XXX -s XXX -o XXX);&lt;BR /&gt;%put &amp;amp;a.;&lt;/P&gt;&lt;P&gt;result:&amp;nbsp;&amp;nbsp;ERROR: Macro keyword SYSEXEC appears as text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 10:18:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Please-help-me-to-retrieve-password-from-unix-command-line-using/m-p/881669#M39103</guid>
      <dc:creator>Teju2</dc:creator>
      <dc:date>2023-06-21T10:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me to retrieve password from unix command line using SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Please-help-me-to-retrieve-password-from-unix-command-line-using/m-p/881684#M39104</link>
      <description>&lt;P&gt;Try 2 is the best method. Expand it like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename tmp pipe '/opt/software/dbclients/CyberArk/cark_getpwd.ksh -a XXX -s XXX -o XXX 2&amp;gt;&amp;amp;1';

data want;
length return_string $2000;
infile tmp;
input return_string $;
put return_string=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The 2&amp;gt;&amp;amp;1 redirects stderr to stdout, so that&amp;nbsp;&lt;EM&gt;all&lt;/EM&gt; messages will appear in the SAS log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But this:&lt;/P&gt;
&lt;PRE&gt;/opt/software/dbclients/CyberArk/cark_getpwd.ksh[23]: /opt/CARKaim/sdk/clipasswordsdk not found&lt;/PRE&gt;
&lt;P&gt;indicates that there is a problem locating a library or module needed for the command to work. Look at line 23 of the shell script.&lt;/P&gt;
&lt;P&gt;Make sure that your direct and SAS attempt to run the command are executed in the same environment:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;same server&lt;/LI&gt;
&lt;LI&gt;same user&lt;/LI&gt;
&lt;LI&gt;same settings in environment variables (e.g. PATH, LIBPATH)&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 21 Jun 2023 11:39:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Please-help-me-to-retrieve-password-from-unix-command-line-using/m-p/881684#M39104</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-06-21T11:39:24Z</dc:date>
    </item>
  </channel>
</rss>

