<?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 Programming challenge: SASHELP.CLASS gets millennial update with emojis in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Programming-challenge-SASHELP-CLASS-gets-millennial-update-with/m-p/823544#M325175</link>
    <description>&lt;P&gt;It's nearly July 17, also &lt;A href="https://worldemojiday.com/" target="_self"&gt;known as #WorldEmojiDay&lt;/A&gt;! In this challenge, the famous CLASS data set received an update for the modern times we live in. We still have student names, but all other attributes have been&amp;nbsp;&lt;STRONG&gt;replaced&lt;/STRONG&gt; with emojis. We've now got fields for gender (we don't use the term "sex" anymore), current mood, "spirit" animal, and appointment time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snippet of the new CLASS" style="width: 510px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60995i20875F1B39D67A41/image-size/large?v=v2&amp;amp;px=999" role="button" title="emoji-class.jpg" alt="Snippet of the new CLASS" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Snippet of the new CLASS&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You'll find the new data set &lt;STRONG&gt;attached&lt;/STRONG&gt; as a CSV file (modern_class.csv) to this message. Your job is to read the new class data into SAS and "translate" the emoji fields into words (presumably so that people who don't "speak emoji" can read it).&amp;nbsp; &lt;STRONG&gt;Create a SAS report&lt;/STRONG&gt; (PROC PRINT is fine) that contains the "wordy" version of the data. Show your code and results in your replies.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Hints/Notes:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;This &lt;A href="https://blogs.sas.com/content/sasdummy/2021/07/06/emojis-sas/" target="_self"&gt;blog post teaches you how to work with emojis in SAS&lt;/A&gt;, and provides sample code you can use to retrieve the definitions and codes for all emojis. The most robust solution will be able to process any emoji encountered in the data.&lt;/LI&gt;
&lt;LI&gt;You will need to use a SAS session with UTF-8 encoding. If you use &lt;A href="https://www.sas.com/en_us/software/on-demand-for-academics.html" target="_self"&gt;SAS OnDemand for Academics&lt;/A&gt; it's UTF-8 by default. And SAS Viya is always UTF-8. Emojis rely on Unicode, so limited encodings like wlatin1 will not be able to process these data.&lt;/LI&gt;
&lt;LI&gt;Keep in mind that modern systems are not limited to "male" and "female" for gender, and neither is this updated CLASS data set.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;(Note: last year we shared this challenge on &lt;A href="https://explorers.sas.com/" target="_self"&gt;SAS Analytics Explorers&lt;/A&gt;. Decided to share with a wider audience this time!)&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jul 2022 16:19:16 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2022-07-15T16:19:16Z</dc:date>
    <item>
      <title>Programming challenge: SASHELP.CLASS gets millennial update with emojis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Programming-challenge-SASHELP-CLASS-gets-millennial-update-with/m-p/823544#M325175</link>
      <description>&lt;P&gt;It's nearly July 17, also &lt;A href="https://worldemojiday.com/" target="_self"&gt;known as #WorldEmojiDay&lt;/A&gt;! In this challenge, the famous CLASS data set received an update for the modern times we live in. We still have student names, but all other attributes have been&amp;nbsp;&lt;STRONG&gt;replaced&lt;/STRONG&gt; with emojis. We've now got fields for gender (we don't use the term "sex" anymore), current mood, "spirit" animal, and appointment time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snippet of the new CLASS" style="width: 510px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60995i20875F1B39D67A41/image-size/large?v=v2&amp;amp;px=999" role="button" title="emoji-class.jpg" alt="Snippet of the new CLASS" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Snippet of the new CLASS&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You'll find the new data set &lt;STRONG&gt;attached&lt;/STRONG&gt; as a CSV file (modern_class.csv) to this message. Your job is to read the new class data into SAS and "translate" the emoji fields into words (presumably so that people who don't "speak emoji" can read it).&amp;nbsp; &lt;STRONG&gt;Create a SAS report&lt;/STRONG&gt; (PROC PRINT is fine) that contains the "wordy" version of the data. Show your code and results in your replies.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Hints/Notes:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;This &lt;A href="https://blogs.sas.com/content/sasdummy/2021/07/06/emojis-sas/" target="_self"&gt;blog post teaches you how to work with emojis in SAS&lt;/A&gt;, and provides sample code you can use to retrieve the definitions and codes for all emojis. The most robust solution will be able to process any emoji encountered in the data.&lt;/LI&gt;
&lt;LI&gt;You will need to use a SAS session with UTF-8 encoding. If you use &lt;A href="https://www.sas.com/en_us/software/on-demand-for-academics.html" target="_self"&gt;SAS OnDemand for Academics&lt;/A&gt; it's UTF-8 by default. And SAS Viya is always UTF-8. Emojis rely on Unicode, so limited encodings like wlatin1 will not be able to process these data.&lt;/LI&gt;
&lt;LI&gt;Keep in mind that modern systems are not limited to "male" and "female" for gender, and neither is this updated CLASS data set.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;(Note: last year we shared this challenge on &lt;A href="https://explorers.sas.com/" target="_self"&gt;SAS Analytics Explorers&lt;/A&gt;. Decided to share with a wider audience this time!)&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 16:19:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Programming-challenge-SASHELP-CLASS-gets-millennial-update-with/m-p/823544#M325175</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2022-07-15T16:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Programming challenge: SASHELP.CLASS gets millennial update with emojis</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Programming-challenge-SASHELP-CLASS-gets-millennial-update-with/m-p/823610#M325215</link>
      <description>&lt;P&gt;The clocks made that interesting.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data appt_time;
  fmtname='$appt_time';
  do i=128336 to 128347;
    start=unicode(cats('&amp;amp;#',i,';'),'ncr');
    label=put(mod(i,128335)*3600,hhmm.);
    output;
  end;
  do i=128348 to 128359;
    start=unicode(cats('&amp;amp;#',i,';'),'ncr');
    label=put(mod(i,128347)*3600+1800,hhmm.);
    output;
  end;
run;
proc format lib=work cntlin=work.appt_time;
run;
proc format;
  value $gender
    👦='Male'
    👧='Female'
    🧒='Non-Binary'
    other='Undefined'
    ;
  /* and so on for the rest */
run;

data modern_class;
  infile datalines dlm=',' dsd truncover;
  input (name gender mood animal appt_time) ($);
datalines;
Alfred,👦,😏,🦄,🕛
Alice,👧,😒,🦓,🕧
Barbara,👧,🙄,🦌,🕐
Carol,🧒,😬,🦬,🕜
Henry,👦,🤥,🐮,🕑
James,👦,😌,🐂,🕝
Jane,👧,😔,🐃,🕒
Janet,🧒,😪,🐄,🕞
Jeffrey,👦,🤤,🐷,🕓
John,👦,😴,🐖,🕟
Joyce,👧,😒,🐗,🕔
Judy,🧒,🙄,🐽,🕠
Louise,👧,😬,🐏,🕕
Mary,👧,😌,🐑,🕡
Philip,👦,😔,🐐,🕖
Robert,🧒,😪,🐪,🕢
Ronald,👦,😏,🐫,🕗
Thomas,👦,😒,🦙,🕣
William,👦,🙄,🦒,🕘
;

proc print data=modern_class;
  format gender $gender. appt_time $appt_time.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 16 Jul 2022 06:11:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Programming-challenge-SASHELP-CLASS-gets-millennial-update-with/m-p/823610#M325215</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-07-16T06:11:19Z</dc:date>
    </item>
  </channel>
</rss>

