<?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 %loc2xpt in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/775828#M246641</link>
    <description>&lt;P&gt;Hello, teachers, use the SAS official website %loc2xpt to convert the SAS data set into XPT format. If there is&amp;nbsp; ae and ya in the logic library, two data sets will be converted into an XPT file at the same time. I read the next%loc2xpt program.Can't there be a data set starting with y with% loc2xpt?&lt;/P&gt;</description>
    <pubDate>Fri, 22 Oct 2021 08:20:42 GMT</pubDate>
    <dc:creator>OrangePeel</dc:creator>
    <dc:date>2021-10-22T08:20:42Z</dc:date>
    <item>
      <title>%loc2xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/775828#M246641</link>
      <description>&lt;P&gt;Hello, teachers, use the SAS official website %loc2xpt to convert the SAS data set into XPT format. If there is&amp;nbsp; ae and ya in the logic library, two data sets will be converted into an XPT file at the same time. I read the next%loc2xpt program.Can't there be a data set starting with y with% loc2xpt?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 08:20:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/775828#M246641</guid>
      <dc:creator>OrangePeel</dc:creator>
      <dc:date>2021-10-22T08:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: %loc2xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/775839#M246647</link>
      <description>I assume you have seen the documentation &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/movefile/p13q0v60f08mj3n1ebm8salcpkmh.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/movefile/p13q0v60f08mj3n1ebm8salcpkmh.htm&lt;/A&gt;. What exactly is the issue for you?&lt;BR /&gt;Taking the code below if you have datasets ae and ya in yourlib then you will get ae and ya in work. Or does that not work for you? &lt;BR /&gt;%loc2xpt(libref=yourlib, &lt;BR /&gt;           filespec='yourtransportfile.v9xpt' )&lt;BR /&gt;%xpt2loc(libref=work, &lt;BR /&gt;           filespec='yourtransportfile.v9xpt' )</description>
      <pubDate>Fri, 22 Oct 2021 09:44:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/775839#M246647</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2021-10-22T09:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: %loc2xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/775883#M246658</link>
      <description>&lt;P&gt;Please read the text you posted carefully and confirm that "ae" and "ya" are indeed to two ASCII characters and not some single character such as "æ".&lt;/P&gt;
&lt;P&gt;If special characters you would have to make sure that option Validmemname=Extend is set and use name literals, the data set name in quotes followed by n such as "æ_otherbits"n to reference the data set name(s).&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 14:40:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/775883#M246658</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-10-22T14:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: %loc2xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/775996#M246703</link>
      <description>&lt;P&gt;What is the question exactly?&lt;BR /&gt;If if ask %LOC2XPT() to put more than one dataset into the same XPORT file it will do that.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Oct 2021 02:53:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/775996#M246703</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-10-23T02:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: %loc2xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776125#M246770</link>
      <description>&lt;P&gt;I remember one of my colleagues has met this bug.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The bug is from a sub macro of %loc2xpt, named %make_memwant_fmt, you can find it in xptcommn.sas, at path &lt;EM&gt;%sysget(sasroot)\core\sasmacro.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Now open this file in your SAS editor, the 'Y' letter is from the 3rd line of&amp;nbsp;%make_memwant_fmt.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 04:28:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776125#M246770</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2021-10-25T04:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: %loc2xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776131#M246775</link>
      <description>yes,thanks,How to solve it?</description>
      <pubDate>Mon, 25 Oct 2021 06:14:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776131#M246775</guid>
      <dc:creator>OrangePeel</dc:creator>
      <dc:date>2021-10-25T06:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: %loc2xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776158#M246796</link>
      <description>&lt;P&gt;I'm sorry I can not do a test for you now. I would suggest you to start at deleting the format dataset at each time you call this macro.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 10:06:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776158#M246796</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2021-10-25T10:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: %loc2xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776213#M246818</link>
      <description>&lt;P&gt;The issue is that the format generated does not include and OTHER clause so instead of returning NO or some other fixed text when the member is not in the desired list it returns the first letter of the name.&amp;nbsp; Since LOC2XPT is testing if the formatted value is Y then any dataset whose name starts with an uppercase Y will be included.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I reported the issue to SAS Support so hopefully eventually they will fix it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the meantime make a copy of the LOC2XPT macro and make the following change.&lt;/P&gt;
&lt;P&gt;Replace this line:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;        want = memtype='DATA' and put(upcase(memname),$memwant.)='Y';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;With this block of code instead:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%if 0=%length(&amp;amp;memlist) or  %qupcase(&amp;amp;memlist) = _ALL_ %then %do;
        want = memtype='DATA';
%end;
%else %do;
  %local i member ;
        want = memtype='DATA' and upcase(memname) in (
  %do i=1 %to %sysfunc(countw(&amp;amp;memlist,%str( ),q));
     %let member=%qscan(&amp;amp;memlist,&amp;amp;i,%str( ),q);
     %let member=%qupcase(%qsysfunc(dequote(&amp;amp;member)));
     %let member=%sysfunc(quote(&amp;amp;member,%str(%')));
        &amp;amp;member
   %end;
        );
%end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So basically it skips the FORMAT altogether and just generates an IN condition when you give a list of names. The names can by quoted to allow for non-standard names supported when VALIDMEMNAME=EXTEND setting is in place.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 15:21:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776213#M246818</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-10-25T15:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: %loc2xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776217#M246820</link>
      <description>&lt;P&gt;For more minimalist change change the Y used by the format to lowercase.&lt;/P&gt;
&lt;P&gt;Then you just have to change one letter each in two files.&lt;/P&gt;
&lt;P&gt;In xptcommn.sas change set label to lowercase y instead of Y.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro make_memwant_fmt(memlist);
%global singmem;
data cntlin;
     fmtname='$memwant'; label='y'; hlo=' ';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In loc2xpt.sas change the Y to lowercase also&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;        want = memtype='DATA' and put(upcase(memname),$memwant.)='y';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can see that the %LOC2XPT macro is passing the uppercase version of the member name to the $MEMWANT format. So even though the format is not fixed to include an other case so it will still return the first letter of unmatched names that letter can never by lowercase here because of the UPCASE() function call.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 15:44:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776217#M246820</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-10-25T15:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: %loc2xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776340#M246880</link>
      <description>Very impressive!</description>
      <pubDate>Tue, 26 Oct 2021 01:04:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776340#M246880</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2021-10-26T01:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: %loc2xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776343#M246881</link>
      <description>Yes, this modification works, but it also needs to be modified like this when using %xpt2loc</description>
      <pubDate>Tue, 26 Oct 2021 01:10:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776343#M246881</guid>
      <dc:creator>OrangePeel</dc:creator>
      <dc:date>2021-10-26T01:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: %loc2xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776359#M246894</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/296070"&gt;@OrangePeel&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Yes, this modification works, but it also needs to be modified like this when using %xpt2loc&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If XPT2LOC is using the same logic to restrict the members to export then it probably has the same bug.&amp;nbsp; Looks like it is line #373.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 857px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65026i9B92F120D976C03C/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 03:43:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/776359#M246894</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-10-26T03:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: %loc2xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/777970#M247612</link>
      <description>&lt;P&gt;Looks like this particular bug is fixed in SAS 9.4 M7 release.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The macro still has trouble with non-standard member names.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;7&amp;nbsp;&amp;nbsp;&amp;nbsp; %xptcommn;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MAUTOCOMPLOC:&amp;nbsp; The autocall macro SETDCB is compiling using the autocall source file&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /Volumes/app/sas/devel/sas9.4_m7/SASFoundation/9.4/sasautos/xptcommn.sas.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MPRINT(XPTCOMMN):&amp;nbsp;&amp;nbsp; * just need to define this to avoid a warning message;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;8&amp;nbsp;&amp;nbsp;&amp;nbsp; options mprint;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;9&amp;nbsp;&amp;nbsp;&amp;nbsp; %make_memwant_fmt(abc '1234');&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MPRINT(MAKE_MEMWANT_FMT):&amp;nbsp;&amp;nbsp; data cntlin;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MPRINT(MAKE_MEMWANT_FMT):&amp;nbsp;&amp;nbsp; fmtname='$memwant';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MPRINT(MAKE_MEMWANT_FMT):&amp;nbsp;&amp;nbsp; label='Y';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MPRINT(MAKE_MEMWANT_FMT):&amp;nbsp;&amp;nbsp; hlo=' ';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MPRINT(MAKE_MEMWANT_FMT):&amp;nbsp;&amp;nbsp; length start $32;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MPRINT(MAKE_MEMWANT_FMT):&amp;nbsp;&amp;nbsp; start=' ';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MAUTOCOMPLOC:&amp;nbsp; The autocall macro TRIM is compiling using the autocall source file&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /Volumes/app/sas/devel/sas9.4_m7/SASFoundation/9.4/sasautos/trim.sas.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MPRINT(MAKE_MEMWANT_FMT):&amp;nbsp;&amp;nbsp; start=upcase(left("abc "));&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;MPRINT(MAKE_MEMWANT_FMT):&amp;nbsp;&amp;nbsp; output;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;NOTE: One or more missing close parentheses have been supplied for the %LENGTH function.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;ERROR: The macro MAKE_MEMWANT_FMT will stop executing.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;WARNING: The data set WORK.CNTLIN may be incomplete.&amp;nbsp; When this step was stopped there were 0&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; observations and 4 variables.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;NOTE: DATA statement used (Total process time):&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But those are much less common than non standard variable names.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 17:12:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/loc2xpt/m-p/777970#M247612</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-11-02T17:12:35Z</dc:date>
    </item>
  </channel>
</rss>

