<?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: label=&amp;quot;+&amp;quot;||SS_year &amp;lt;-- what does the ||SS_year mean? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/label-quot-quot-SS-year-lt-what-does-the-SS-year-mean/m-p/407905#M99444</link>
    <description>Thanks so much! You're helping me learn SAS &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
    <pubDate>Fri, 27 Oct 2017 03:46:01 GMT</pubDate>
    <dc:creator>cdubs</dc:creator>
    <dc:date>2017-10-27T03:46:01Z</dc:date>
    <item>
      <title>label="+"||SS_year &lt;-- what does the ||SS_year mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-quot-quot-SS-year-lt-what-does-the-SS-year-mean/m-p/407890#M99433</link>
      <description>&lt;P&gt;I'm having trouble understanding the following code, specifically&amp;nbsp;&lt;STRONG&gt;starting with label="+"||SS_year;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i think label="+" means make a variable called "label" and&amp;nbsp;populate it with "+", but I'm not sure what the "||SS_year" comes in.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, what does&amp;nbsp;&lt;STRONG&gt;fmtname="$all_pts_prev";&lt;/STRONG&gt; mean?&amp;nbsp;Make a variable called "fmtname" that is populated by "$all_pts_prev"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Relevant code below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data fmt_all_yrs;
	set interim.sample;
	if SS_2010=1 then SS_year='2010';
		else if SS_2011=1 then SS_year='2011';
		else if SS_2012=1 then SS_year='2012';
		else if SS_2013=1 then SS_year='2013';
		else if SS_2014=1 then SS_year='2014';
	start=strip(patient_id);
	label="+"||SS_year;
	fmtname="$all_pts_prev";
	keep start label fmtname;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And code&amp;nbsp;immediately after this says&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort nodupkey data=fmt_all_yrs 
			out=format.fmt_all_pts_prev; 
			by start;
run;

proc format cntlin=format.fmt_all_pts_prev library=format;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is this saying we're going to sort a dataset called&amp;nbsp;&lt;STRONG&gt;fmt_all_yrs&lt;/STRONG&gt; and&amp;nbsp;output it into the library format, and call the new dataset "fmt_all_pts_prev" and organize it by the variable "start"...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure what the last line means though (proc format cntlin=format.fmt_all_pts_prev library=format;)&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 02:20:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-quot-quot-SS-year-lt-what-does-the-SS-year-mean/m-p/407890#M99433</guid>
      <dc:creator>cdubs</dc:creator>
      <dc:date>2017-10-27T02:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: label="+"||SS_year &lt;-- what does the ||SS_year mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-quot-quot-SS-year-lt-what-does-the-SS-year-mean/m-p/407893#M99434</link>
      <description>&lt;P&gt;|| concatenates character strings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code as a whole is creating a data set that will create a format--instructions for rendering a value in a data set in a particular way.&amp;nbsp; SAS provides many formats.&amp;nbsp; The 5.2 format will display 33.33333 is 33.33.&amp;nbsp; However, many times you want explicit ad hoc instructions such as display 'M' as 'Male' and display 'F' as 'Female'.&amp;nbsp; Look at the PROC FORMAT documentation and you will see examples of other CNTLIN= data set that make formats.&amp;nbsp; Values of your variable that match Start should instead be displayed as the value of Label.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 02:48:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-quot-quot-SS-year-lt-what-does-the-SS-year-mean/m-p/407893#M99434</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-10-27T02:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: label="+"||SS_year &lt;-- what does the ||SS_year mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-quot-quot-SS-year-lt-what-does-the-SS-year-mean/m-p/407896#M99436</link>
      <description>&lt;P&gt;Thank you! Super helpful and learning so much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Two&amp;nbsp;questions below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; So the $all_pts_prev doesn't seem to be a SAS format... does that mean that this coder made a new format called "$all_pts_prev" and stored it in a dataset called "fmt_all_pts_prev"?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How could I set up such a format dataset myself? I don't have access to the original dataset so I'm trying to figure out what's going on here...&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;sort&lt;/SPAN&gt; nodupkey &lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;fmt_all_yrs 
			out&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;format&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;fmt_all_pts_prev&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt; 
			&lt;SPAN class="token statement"&gt;by&lt;/SPAN&gt; start&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;format&lt;/SPAN&gt; cntlin&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;format&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;fmt_all_pts_prev library&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;format&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. What do you mean by "v&lt;SPAN&gt;alues of your variable that match Start should instead be displayed as the value of Label."?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 03:11:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-quot-quot-SS-year-lt-what-does-the-SS-year-mean/m-p/407896#M99436</guid>
      <dc:creator>cdubs</dc:creator>
      <dc:date>2017-10-27T03:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: label="+"||SS_year &lt;-- what does the ||SS_year mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-quot-quot-SS-year-lt-what-does-the-SS-year-mean/m-p/407897#M99437</link>
      <description>&lt;P&gt;&lt;SPAN&gt;​I think it would be good to look at the CNTLIN= example in the doc.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;$all_pts_prev&amp;nbsp; is not a format SAS provides.&amp;nbsp; It is the one you are making.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Like I said, your variable might have values like 1 or M for Male or 2 or F for Female.&amp;nbsp; So you can write a format to display Male and Female instead of the less informative values.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Even if you don't have the original data, print the CNTLIN data set.&amp;nbsp; The start values are like my 1, M or 2, F values.&amp;nbsp; The label values are like my Male and Female values.&amp;nbsp; Formats enable you to display custom values for any (typically more parsimonious&amp;nbsp;values).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 03:20:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-quot-quot-SS-year-lt-what-does-the-SS-year-mean/m-p/407897#M99437</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-10-27T03:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: label="+"||SS_year &lt;-- what does the ||SS_year mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-quot-quot-SS-year-lt-what-does-the-SS-year-mean/m-p/407899#M99439</link>
      <description>Thank you for the response!&lt;BR /&gt;&lt;BR /&gt;So in SAS, "making" a format often means making a dataset thats like&lt;BR /&gt;&lt;BR /&gt;start ... label&lt;BR /&gt;M.... Male&lt;BR /&gt;F.... Female&lt;BR /&gt;&lt;BR /&gt;? I'm not sure how to print the CNTLIN data set, unfortunately &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; B/c I'm not sure I can even run this code if I don't any data? (I have none of the original data :/)</description>
      <pubDate>Fri, 27 Oct 2017 03:27:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-quot-quot-SS-year-lt-what-does-the-SS-year-mean/m-p/407899#M99439</guid>
      <dc:creator>cdubs</dc:creator>
      <dc:date>2017-10-27T03:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: label="+"||SS_year &lt;-- what does the ||SS_year mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-quot-quot-SS-year-lt-what-does-the-SS-year-mean/m-p/407902#M99441</link>
      <description>&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2017/10/09/advanced-ods-graphics-axis-tables-contain-special-characters/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2017/10/09/advanced-ods-graphics-axis-tables-contain-special-characters/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is one of my blogs.&amp;nbsp; It begins with a vanilla example of making a format by using a VALUE statement, then it shows the CNTLIN= data set approach.&amp;nbsp; I use both regularly in my work.&amp;nbsp; It just depends on whether it is more convenient to create a data set or a statement.&amp;nbsp; The content of the blog may be a bit beyond what you are looking for, but the technique is the same regardless of the problem.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 03:32:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-quot-quot-SS-year-lt-what-does-the-SS-year-mean/m-p/407902#M99441</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-10-27T03:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: label="+"||SS_year &lt;-- what does the ||SS_year mean?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/label-quot-quot-SS-year-lt-what-does-the-SS-year-mean/m-p/407905#M99444</link>
      <description>Thanks so much! You're helping me learn SAS &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Fri, 27 Oct 2017 03:46:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/label-quot-quot-SS-year-lt-what-does-the-SS-year-mean/m-p/407905#M99444</guid>
      <dc:creator>cdubs</dc:creator>
      <dc:date>2017-10-27T03:46:01Z</dc:date>
    </item>
  </channel>
</rss>

