<?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: User-defined formats and Enterprise Guide : Strange behavior in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624318#M183902</link>
    <description>&lt;P&gt;Hi Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your comments.&lt;/P&gt;
&lt;DIV class="lia-quilt-column lia-quilt-column-20 lia-quilt-column-right lia-quilt-column-main-right"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-right"&gt;
&lt;P class="lia-message-dates lia-message-post-date lia-component-post-date-last-edited"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-message-dates lia-message-post-date lia-component-post-date-last-edited"&gt;Yes, your re-statement is correct.&lt;/P&gt;
&lt;P class="lia-message-dates lia-message-post-date lia-component-post-date-last-edited"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-message-dates lia-message-post-date lia-component-post-date-last-edited"&gt;At our shop, users don't have access to old standard SAS, but just SAS Enterprise Guide, which have built-in capacities to open tables ans views.&lt;/P&gt;
&lt;P class="lia-message-dates lia-message-post-date lia-component-post-date-last-edited"&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="messagebodydisplay_0_0" class="lia-message-body lia-component-body"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;Yes, I did close and re-open the viewer, but it's the first defined format that is used, even if the log shows when we ran another proc format to redefines the former&lt;/P&gt;
&lt;P&gt;NOTE: Format $SEXF is already on the library WORK.FORMATS.&lt;BR /&gt;NOTE: Format $SEXF has been output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc format cntlout=sexf; select $sexf; run;&lt;/P&gt;
&lt;P&gt;proc print; run;&lt;/P&gt;
&lt;P&gt;show the correct formatting with english labels&lt;/P&gt;
&lt;P&gt;still proc freq show the french version&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you close Enterprise Guide and start it again, then it would be a new sas session and same thing happens.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thien&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Wed, 12 Feb 2020 19:34:55 GMT</pubDate>
    <dc:creator>tlt</dc:creator>
    <dc:date>2020-02-12T19:34:55Z</dc:date>
    <item>
      <title>User-defined formats and Enterprise Guide : Strange behavior</title>
      <link>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624294#M183894</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Were are using SAS 9.04.01M5P091317 + SEGuide 7.15 HF8 (7.100.5.6214) (32 bits)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;User-defined formats sometimes surprise me&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;A simple format, french style&lt;BR /&gt;proc format; value $ sexf 'M'='Masculin' 'F'='Féminin' other='NSP' ; run;&lt;/LI&gt;
&lt;LI&gt;Attach the format to variable SEX in a view on SASHELP.CLASS (my favorite)&lt;BR /&gt;proc sql;&lt;BR /&gt;&amp;nbsp; create view class as select NAME, SEX format=$SEXF., AGE, HEIGHT, WEIGHT from sashelp.class;&lt;BR /&gt;quit;&lt;/LI&gt;
&lt;LI&gt;A PROC FREQ on the variable&lt;BR /&gt;proc freq data=class; tables SEX; run;&lt;/LI&gt;
&lt;LI&gt;Re-define the format, US style&lt;BR /&gt;proc format; value $ sexf 'M'='Male' 'F'='Female' other='Unknown' ; run;&lt;/LI&gt;
&lt;LI&gt;Another freq&lt;BR /&gt;proc freq data=class; tables SEX; run;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;The output shows the 2 versions as expected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if I execute steps 1+2, open the view (which shows the french labels), then execute 3+4+5, output shows twice the same version, french style.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Same phenomena if I use table, with rebuilding, instead of views.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any hint would be highly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thien&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 18:55:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624294#M183894</guid>
      <dc:creator>tlt</dc:creator>
      <dc:date>2020-02-12T18:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: User-defined formats and Enterprise Guide : Strange behavior</title>
      <link>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624300#M183897</link>
      <description>&lt;P&gt;Let me re-state the problem to make sure I understand.&lt;/P&gt;
&lt;P&gt;You are using some Enterprise Guide feature to let you browse the contents of a dataset instead of looking at the output of a report.&amp;nbsp; And it is able to show you the decoded (formatted) value of your variable.&amp;nbsp; You then ran some SAS code that changed the meaning of the format in your SAS session.&amp;nbsp; &amp;nbsp;Now the tool in Enterprise Guide is still using the old definition of the format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you close that viewer tool and re-open it after you changed the definition of the format in your SAS session?&lt;/P&gt;
&lt;P&gt;Did you try starting your SAS session and then changing the format definition (or creating for the first time if not permanent) and then re-opening the Enterprise Guide browser tool?&lt;/P&gt;
&lt;P&gt;Did you try closing Enterprise Guide and starting it again?&amp;nbsp; If you just define the new format does it find it?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 19:14:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624300#M183897</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-02-12T19:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: User-defined formats and Enterprise Guide : Strange behavior</title>
      <link>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624318#M183902</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your comments.&lt;/P&gt;
&lt;DIV class="lia-quilt-column lia-quilt-column-20 lia-quilt-column-right lia-quilt-column-main-right"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-right"&gt;
&lt;P class="lia-message-dates lia-message-post-date lia-component-post-date-last-edited"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-message-dates lia-message-post-date lia-component-post-date-last-edited"&gt;Yes, your re-statement is correct.&lt;/P&gt;
&lt;P class="lia-message-dates lia-message-post-date lia-component-post-date-last-edited"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-message-dates lia-message-post-date lia-component-post-date-last-edited"&gt;At our shop, users don't have access to old standard SAS, but just SAS Enterprise Guide, which have built-in capacities to open tables ans views.&lt;/P&gt;
&lt;P class="lia-message-dates lia-message-post-date lia-component-post-date-last-edited"&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="messagebodydisplay_0_0" class="lia-message-body lia-component-body"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;Yes, I did close and re-open the viewer, but it's the first defined format that is used, even if the log shows when we ran another proc format to redefines the former&lt;/P&gt;
&lt;P&gt;NOTE: Format $SEXF is already on the library WORK.FORMATS.&lt;BR /&gt;NOTE: Format $SEXF has been output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc format cntlout=sexf; select $sexf; run;&lt;/P&gt;
&lt;P&gt;proc print; run;&lt;/P&gt;
&lt;P&gt;show the correct formatting with english labels&lt;/P&gt;
&lt;P&gt;still proc freq show the french version&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you close Enterprise Guide and start it again, then it would be a new sas session and same thing happens.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thien&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Feb 2020 19:34:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624318#M183902</guid>
      <dc:creator>tlt</dc:creator>
      <dc:date>2020-02-12T19:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: User-defined formats and Enterprise Guide : Strange behavior</title>
      <link>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624319#M183903</link>
      <description>&lt;P&gt;Sounds like a limitation of EG.&lt;/P&gt;
&lt;P&gt;What version of EG are you using? What version of SAS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why not just use different names for the different formats?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 19:40:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624319#M183903</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-02-12T19:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: User-defined formats and Enterprise Guide : Strange behavior</title>
      <link>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624322#M183905</link>
      <description>Were are using SAS 9.04.01M5P091317 + SEGuide 7.15 HF8 (7.100.5.6214) (32 bits)&lt;BR /&gt;&lt;BR /&gt;View with format redefinition allow dynamic results with the same procedure.&lt;BR /&gt;&lt;BR /&gt;If we don't open the view/table between redefintions of the format, it's OK.</description>
      <pubDate>Wed, 12 Feb 2020 19:54:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624322#M183905</guid>
      <dc:creator>tlt</dc:creator>
      <dc:date>2020-02-12T19:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: User-defined formats and Enterprise Guide : Strange behavior</title>
      <link>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624354#M183916</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13620"&gt;@tlt&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to replicate the phenomenon in SAS 9.4M5 (not using EG) with the ViewTable window. It appears that the format definition is kept in memory as long as the ViewTable using it is open.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the code I used:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format; value $sexf 'M'='Male' 'F'='Female' other='Unknown'; run;

data class;
set sashelp.class;
format sex $sexf.;
run;

dm 'vt class browse'; /* opens CLASS in ViewTable window (browse mode is optional) */

proc catalog c=formats;
delete sexf / et=formatc;
quit; /* Deletion successful, but ... */

data test;
x='M';
format x $sexf.; /* ... the format is still available ... */
proc print;
run; /* ... and applied as usual -- thanks to the open ViewTable window. */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, once I close the ViewTable window, repeating the last PROC PRINT step fails with the usual error message about the format not being found. Before that, the log was clean.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 21:51:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624354#M183916</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-02-12T21:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: User-defined formats and Enterprise Guide : Strange behavior</title>
      <link>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624444#M183958</link>
      <description>&lt;P&gt;Hi Dear Respected Advisor,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your hint.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DM is not allowed in our environnment, so I cannot launch view table explicitly.&lt;/P&gt;
&lt;P&gt;By default, NOFMTERROR is set here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, I set it to FMTERR, define the format, defines the view, open it (OK), delete the format, issue a proc format cntlout just to be sure the format is not found, open the view again ===&amp;gt; NO ERROR, issue the FREQ ===&amp;gt; NO ERROR&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My guess is that's probably SAS Enterprise Guide is using view table, launch it when I click on my view and does not end it even if I close the view.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thien&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 10:53:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624444#M183958</guid>
      <dc:creator>tlt</dc:creator>
      <dc:date>2020-02-13T10:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: User-defined formats and Enterprise Guide : Strange behavior</title>
      <link>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624474#M183976</link>
      <description>From support@sas.com&lt;BR /&gt;&lt;BR /&gt;Problem Note 65104: Labels might be incorrect when a custom format is created and updated in the same session and used in a view definition&lt;BR /&gt;&lt;A href="http://support.sas.com/kb/65104" target="_blank"&gt;http://support.sas.com/kb/65104&lt;/A&gt;</description>
      <pubDate>Thu, 13 Feb 2020 14:13:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/User-defined-formats-and-Enterprise-Guide-Strange-behavior/m-p/624474#M183976</guid>
      <dc:creator>tlt</dc:creator>
      <dc:date>2020-02-13T14:13:53Z</dc:date>
    </item>
  </channel>
</rss>

