<?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 use pipe dir to read contains chinese-character path  in UNICODE SAS  Environment in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-pipe-dir-to-read-contains-chinese-character-path-in/m-p/924077#M363741</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Use the&amp;nbsp;&lt;/SPAN&gt;&lt;A title="BasePlus" href="https://github.com/SASPAC/baseplus" target="_self" rel="nofollow noopener noreferrer"&gt;BasePlus package&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;and the&amp;nbsp;&lt;/SPAN&gt;&lt;A title="dirsAndFiles" href="https://github.com/SASPAC/baseplus/blob/main/baseplus.md#dirsandfiles-macro-6" target="_self" rel="nofollow noopener noreferrer"&gt;%dirsAndFiles() macro&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;e.g.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%dirsAndFiles(C:\SAS_WORK\,ODS=work.result)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It works with UTF characters (I've tested it)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. Here are some instructions how to get BasePlus package and where the documentation is.&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-sas"&gt;&lt;CODE&gt;/*
Details about SAS Packages Framework:
- https://github.com/yabwon/SAS_PACKAGES

Tutorial:
- https://github.com/yabwon/HoW-SASPackages

BasePlus documentation:
- https://github.com/SASPAC/macroarray/blob/main/baseplus.md
*/

/* Step 1. */
/* Install SAS Packages Framework and BasePlus package. */
/* Run this only once. */
filename SPFinit url "https://bit.ly/SPFinit";
%include SPFinit; 
filename SPFinit clear;

/* create directory for the framework and packages */
filename packages "&amp;lt;/your/directory/for/packages/&amp;gt;";
/* install the framework and the BasePlus package */ 
%installPackage(SPFinit BasePlus)


/* Step 2. */
/* From now on if you want to use a package: */
/* Run this at the beginning of your new SAS Session (or add it to autoexec). */
/* Enable framework and load package  */
filename packages "&amp;lt;/your/directory/for/packages/&amp;gt;";
%include packages(SPFinit.sas); 
%loadPackage(BasePlus)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Apr 2024 10:22:45 GMT</pubDate>
    <dc:creator>yabwon</dc:creator>
    <dc:date>2024-04-12T10:22:45Z</dc:date>
    <item>
      <title>How to use pipe dir to read contains chinese-character path  in UNICODE SAS  Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-pipe-dir-to-read-contains-chinese-character-path-in/m-p/924055#M363738</link>
      <description>I want to use pipe dir to get the filename path and import the datasets ；but if file path contains&amp;nbsp;chinese-character ，will happend the stderror outout in log and i can't get the files path in unicode SAS，but it‘s ok in chinese SAS Environment,so how to modify the code？（Sure, I could use 2&amp;gt;&amp;amp;1, but we still can't get the correct file path）. this is my code: %let path=C:\Users\Administrator\Desktop\中文; FILENAME DIRLIST&amp;nbsp; PIPE "DIR ""&amp;amp;PATH"" /B encoding='UTF8'&amp;nbsp; 2&amp;gt;&amp;amp;1"&amp;nbsp; ; DATA dirlist1; INFILE dirlist&amp;nbsp; LENGTH=RECLEN ;&amp;nbsp;&amp;nbsp; INPUT FILENAME $varying1024. RECLEN; path="&amp;amp;path"; filename1=FILENAME;&amp;nbsp;&amp;nbsp; filename=CATS(path, '\', filename1);&amp;nbsp;&amp;nbsp; RUN;</description>
      <pubDate>Fri, 12 Apr 2024 06:05:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-pipe-dir-to-read-contains-chinese-character-path-in/m-p/924055#M363738</guid>
      <dc:creator>Ethan_Kael</dc:creator>
      <dc:date>2024-04-12T06:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use pipe dir to read contains chinese-character path  in UNICODE SAS  Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-pipe-dir-to-read-contains-chinese-character-path-in/m-p/924077#M363741</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Use the&amp;nbsp;&lt;/SPAN&gt;&lt;A title="BasePlus" href="https://github.com/SASPAC/baseplus" target="_self" rel="nofollow noopener noreferrer"&gt;BasePlus package&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;and the&amp;nbsp;&lt;/SPAN&gt;&lt;A title="dirsAndFiles" href="https://github.com/SASPAC/baseplus/blob/main/baseplus.md#dirsandfiles-macro-6" target="_self" rel="nofollow noopener noreferrer"&gt;%dirsAndFiles() macro&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;e.g.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%dirsAndFiles(C:\SAS_WORK\,ODS=work.result)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It works with UTF characters (I've tested it)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. Here are some instructions how to get BasePlus package and where the documentation is.&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-sas"&gt;&lt;CODE&gt;/*
Details about SAS Packages Framework:
- https://github.com/yabwon/SAS_PACKAGES

Tutorial:
- https://github.com/yabwon/HoW-SASPackages

BasePlus documentation:
- https://github.com/SASPAC/macroarray/blob/main/baseplus.md
*/

/* Step 1. */
/* Install SAS Packages Framework and BasePlus package. */
/* Run this only once. */
filename SPFinit url "https://bit.ly/SPFinit";
%include SPFinit; 
filename SPFinit clear;

/* create directory for the framework and packages */
filename packages "&amp;lt;/your/directory/for/packages/&amp;gt;";
/* install the framework and the BasePlus package */ 
%installPackage(SPFinit BasePlus)


/* Step 2. */
/* From now on if you want to use a package: */
/* Run this at the beginning of your new SAS Session (or add it to autoexec). */
/* Enable framework and load package  */
filename packages "&amp;lt;/your/directory/for/packages/&amp;gt;";
%include packages(SPFinit.sas); 
%loadPackage(BasePlus)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 10:22:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-pipe-dir-to-read-contains-chinese-character-path-in/m-p/924077#M363741</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2024-04-12T10:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to use pipe dir to read contains chinese-character path  in UNICODE SAS  Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-pipe-dir-to-read-contains-chinese-character-path-in/m-p/924652#M363949</link>
      <description>Sorry, in this link i can't get the macro of %dirsAndFiles ,so i don't know how to read contains chinese-path files to use pipe dir</description>
      <pubDate>Wed, 17 Apr 2024 08:14:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-pipe-dir-to-read-contains-chinese-character-path-in/m-p/924652#M363949</guid>
      <dc:creator>Ethan_Kael</dc:creator>
      <dc:date>2024-04-17T08:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to use pipe dir to read contains chinese-character path  in UNICODE SAS  Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-pipe-dir-to-read-contains-chinese-character-path-in/m-p/924657#M363951</link>
      <description>&lt;P&gt;The link it to the macro &lt;STRONG&gt;documentation&lt;/STRONG&gt;. Check the "P.S." to see how to get the BasePlus package which contains the %dirsAndFiles() macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 08:52:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-pipe-dir-to-read-contains-chinese-character-path-in/m-p/924657#M363951</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2024-04-17T08:52:05Z</dc:date>
    </item>
  </channel>
</rss>

