<?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: how to set the tks3.conf file if I have 3 environment? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-set-the-tks3-conf-file-if-I-have-3-environment/m-p/950667#M45512</link>
    <description>&lt;P&gt;I've never used PROC S3 / AWS. The advice I posted was from SAS documentation. If the link I provided doesn't help then I'd suggest opening a track with SAS Tech Support.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Nov 2024 19:25:14 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2024-11-13T19:25:14Z</dc:date>
    <item>
      <title>how to set the tks3.conf file if I have 3 environment?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-set-the-tks3-conf-file-if-I-have-3-environment/m-p/950505#M45506</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have set my tks3.config file to get some acces to the dev environment. But How do we do that If I have to extra environment to configure. ex:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dev&lt;/P&gt;
&lt;P&gt;intg&lt;/P&gt;
&lt;P&gt;uat&lt;/P&gt;
&lt;P&gt;which have different keyID and secret.&amp;nbsp; How do we set the tks3.config file in that case. Please provice an example&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 20:44:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-set-the-tks3-conf-file-if-I-have-3-environment/m-p/950505#M45506</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2024-11-12T20:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to set the tks3.conf file if I have 3 environment?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-set-the-tks3-conf-file-if-I-have-3-environment/m-p/950514#M45507</link>
      <description>&lt;P&gt;You really need to provide more details of what you are doing and not just mention some obscure config file. I'm going to guess that you are accessing an Amazon S3 cloud platform. If so and you are using &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p0c79z6br70ko9n1sqfpduqjiyp2.htm" target="_blank" rel="noopener"&gt;PROC S3&lt;/A&gt; then you can specify the TKS3 CONFIG like so:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASKiwi_0-1731453158536.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/102119iF57B632EBB97D6C5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASKiwi_0-1731453158536.png" alt="SASKiwi_0-1731453158536.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Going by the example you could just create dev, intg and uat folders (/u/marti/dev/.tks3.conf) each with their own config file then refer to them as above.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 23:20:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-set-the-tks3-conf-file-if-I-have-3-environment/m-p/950514#M45507</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2024-11-12T23:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to set the tks3.conf file if I have 3 environment?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-set-the-tks3-conf-file-if-I-have-3-environment/m-p/950559#M45509</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have created more than two years ago my &amp;amp;home/.tks3.conf many months ago which contains keyID, secret and the region as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, I don't remember how I have created it and on top of that, the value found into that file are not the one I see on Amazon when I go on AWS access portal. To use three different folders for dev, intg and uat is a very good idea.&amp;nbsp; The first steps I want to do is to get the list of the files into each bucket.&amp;nbsp; You will find my SAS code below. Only the old dev values into the home/.tks3.config file is working.&amp;nbsp; It is strange.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I solve that issue?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can you provide me your SAS script just to get the files listing using either a pipe command or a proc s3 and passing the .tks3 value in it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%macro FindingMasterListPolicyName(env);

%let filelist=/&amp;amp;path1./s3filestodownload.txt;

/***** Selecting the good s3 bucket path according to the environment selected *****/

%if       &amp;amp;env eq dev  %then %let s3bucketpath=s3://dev-pr-brz-datareten-edp-nprod;
%else %if &amp;amp;env eq intg %then %let s3bucketpath=s3://intg-pr-brz-datareten-edp-nprod;
%else %if &amp;amp;env eq uat  %then %let s3bucketpath=s3://uat-pr-brz-datareten-edp-nprod;

%put &amp;amp;=env  &amp;amp;=s3bucketpath;
/*********************************************************************************/

filename oscmd pipe "aws s3 ls ""&amp;amp;s3bucketpath."" --recursive | grep .csv ";

data foldercontents2 ;
length text $2000. fnameandpath $200.;
infile oscmd;
input;
text=_infile_;
run;

data foldercontents2 (drop=text);
set foldercontents2 ;
creationdate=scan(text,1,' ');
creationtime=scan(text,2,' ');
filesize=scan(text,3,' ');
fnameandpath =scan(text,1," ","b");
FName =scan(text,1,"/","b");
path=substr(fnameandpath,1,length(fnameandpath)-length(FName)- 1);
where find(text,'MASTER_LIST') &amp;gt; 0 AND find(text,'_Policy_') &amp;gt; 0 AND find(text,'ARCHIVE') = 0;
run;

proc sort data=foldercontents2 out=foldercontents;
by creationdate creationtime FName;
run;


/*** Getting the path and file name of the Master List to download ***/
Data _null_;
set foldercontents;
if _n_ = 1  then 
do; 
	call symputx('MasterListName',Fname,'g');
        call symputx('masterlistfilepath',Path,'g');
end;
run;
%put &amp;amp;=masterlistfilepath. &amp;amp;=MasterListName.;

%goto exit;

filename filelist "&amp;amp;filelist";
data _null_;
FILE filelist LRECL=150 recfm=v;
put "&amp;amp;masterlistfilepath./&amp;amp;MasterListName.";
;
run;
%exit: %mend FindingMasterListPolicyName;
%FindingMasterListPolicyName(dev);

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Nov 2024 14:59:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-set-the-tks3-conf-file-if-I-have-3-environment/m-p/950559#M45509</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2024-11-13T14:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to set the tks3.conf file if I have 3 environment?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-set-the-tks3-conf-file-if-I-have-3-environment/m-p/950667#M45512</link>
      <description>&lt;P&gt;I've never used PROC S3 / AWS. The advice I posted was from SAS documentation. If the link I provided doesn't help then I'd suggest opening a track with SAS Tech Support.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2024 19:25:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-set-the-tks3-conf-file-if-I-have-3-environment/m-p/950667#M45512</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2024-11-13T19:25:14Z</dc:date>
    </item>
  </channel>
</rss>

