<?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 determine the output file location via file statement? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504602#M135069</link>
    <description>@FreelanceReinhard Excellent thank you very much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
    <pubDate>Tue, 16 Oct 2018 06:43:11 GMT</pubDate>
    <dc:creator>Oligolas</dc:creator>
    <dc:date>2018-10-16T06:43:11Z</dc:date>
    <item>
      <title>How to determine the output file location via file statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504208#M134901</link>
      <description>&lt;P&gt;Could someone of you help me to know how can I find the output file (outfr14a,outfr14b,outfr14) location from the following code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if agi ne agi_v           
    then do;                
      knkbty = '1';         
      knkatv = '' ;         
      knkath = '' ;         
      agiteg = agi;         
      link schrijfv;        
                            
      knkbty = '2';         
      knkatv = '' ;         
      knkath = '' ;         
      agiteg = agi_v;       
      link schrijfh;        
                        end;                                 
    end;                                     
                                             
return;                                      
schrijfh:                                    
  *schrijf weg met huidige gegevens;         
     p2kbrn='7';                             
  if substr(khiref,1,1)  = '1' then do;      
  file outfr14a noprint notitles;            
  link fr14outh;                             
  end;                                       
  if substr(khiref,1,1)  = '2' then do;      
  file outfr14b noprint notitles;            
  link fr14outh;                             
  end;                                       
  else if substr(khiref,1,1)  = '0' then do; 
  file outfr14 noprint notitles;             
  link fr14outh;                             
  end;                                       
          return;                                      
                                             
return;                                      
schrijfv:                                    
  p2kbrn='7';                                
  if substr(khiref,1,1)  = '1' then do;      
  file outfr14a noprint notitles;            
  link fr14outv;                             
  end;                                       
  else if substr(khiref,1,1)  = '2' then do; 
  file outfr14b noprint notitles;            
  link fr14outv;                             
  end;                                       
  else if substr(khiref,1,1)  = '0' then do; 
  file outfr14 noprint notitles;             
  link fr14outv;                             
  end;                                       
  * schrijf weg met huidige gegevens ;       
return;                                      

return;               &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Oct 2018 06:15:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504208#M134901</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-10-15T06:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the output file location via file statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504211#M134904</link>
      <description>&lt;P&gt;That is impossible from just the code you have provided. outfr14a,outfr14b,outfr14 are file references that have been defined somewhere else, perhaps in a FILENAME statement. Start by looking through the rest of your program for other statements that use those references.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 06:26:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504211#M134904</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-10-15T06:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the output file location via file statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504212#M134905</link>
      <description>&lt;P&gt;Hi, if filename have been defined you can use pathname()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; outfr14aLoc = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;(pathname(outfr14a));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; outfr14bLoc = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;(pathname(outfr14b));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; outfr14Loc = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;(pathname(outfr14));&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 06:35:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504212#M134905</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2018-10-15T06:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the output file location via file statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504213#M134906</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/77163"&gt;@Oligolas&lt;/a&gt; - I stand corrected...&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 06:37:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504213#M134906</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-10-15T06:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the output file location via file statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504215#M134907</link>
      <description>&lt;P&gt;and if not.. I presume it will Output a dat file into the Default Output Location defined in SAS. But I haven't found a way to identify it during a SAS session:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screenshot_04.png" style="width: 413px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24004i7A5131F856058654/image-size/large?v=v2&amp;amp;px=999" role="button" title="screenshot_04.png" alt="screenshot_04.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 06:56:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504215#M134907</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2018-10-15T06:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the output file location via file statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504238#M134914</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I missing something, or could this information be found in the log?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 09:32:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504238#M134914</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2018-10-15T09:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the output file location via file statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504240#M134916</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/77163"&gt;@Oligolas&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I presume it will Output a dat file into the Default Output Location defined in SAS. But I haven't found a way to identify it during a SAS session:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screenshot_04.png" style="width: 413px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/24004i7A5131F856058654/image-size/large?v=v2&amp;amp;px=999" role="button" title="screenshot_04.png" alt="screenshot_04.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The path of this so called "current working directory" (not to be confused with the WORK &lt;EM&gt;library&lt;/EM&gt;) can be found as follows (at least on Windows systems):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename dummy '.'; 
%put %sysfunc(pathname(dummy));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 10:03:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504240#M134916</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-10-15T10:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the output file location via file statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504602#M135069</link>
      <description>@FreelanceReinhard Excellent thank you very much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Tue, 16 Oct 2018 06:43:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504602#M135069</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2018-10-16T06:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine the output file location via file statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504611#M135076</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/22588"&gt;@Amir&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am I missing something, or could this information be found in the log?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To simple &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 07:15:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-determine-the-output-file-location-via-file-statement/m-p/504611#M135076</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-10-16T07:15:17Z</dc:date>
    </item>
  </channel>
</rss>

