<?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: PUT Function in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178283#M45533</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;RTM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2 class="title"&gt;Syntax&lt;/H2&gt;&lt;P class="syntaxSimple"&gt;&lt;/P&gt;&lt;DIV class="syntaxLevel"&gt;&lt;DIV class="syntaxLevel"&gt;&lt;SPAN class="keyword"&gt;PUT&lt;/SPAN&gt;(&lt;SPAN class="userSuppliedSyntaxValue"&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/n0mlfb88dkhbmun1x08qbh5xbs7e.htm#p04xmxs2j5ayzpn1ilorfb2gvxhl" title="Description of syntax: source"&gt;source&lt;/A&gt;&lt;/SPAN&gt;, &lt;SPAN class="userSuppliedSyntaxValue"&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/n0mlfb88dkhbmun1x08qbh5xbs7e.htm#p0wfflof7qhl7in1cv1pagjhakip" title="Description of syntax: format."&gt;format&lt;/A&gt;&lt;/SPAN&gt;.)&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P class="syntaxDescription"&gt;&lt;/P&gt;&lt;DIV class="requiredArgGroup"&gt;&lt;H3 class="title"&gt;&lt;A name="p1q9ej8qvt518yn1b86x0v7dxvew"&gt;&lt;/A&gt;Required Arguments&lt;/H3&gt;&lt;A name="p04xmxs2j5ayzpn1ilorfb2gvxhl"&gt;&lt;/A&gt;&lt;DL class="argDescriptionPair"&gt;&lt;DT class="argument"&gt;&lt;SPAN class="userSuppliedValue"&gt;source&lt;/SPAN&gt;&lt;/DT&gt;&lt;DD class="argumentDescription"&gt;&lt;DIV class="paraSimpleFirst"&gt;identifies the constant, variable, or expression whose value you want to reformat. The &lt;SPAN class="userSuppliedValue"&gt;source&lt;/SPAN&gt;argument can be character or numeric.&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DD&gt;&lt;/DL&gt;&lt;A name="p0wfflof7qhl7in1cv1pagjhakip"&gt;&lt;/A&gt;&lt;DL class="argDescriptionPair"&gt;&lt;DT class="argument"&gt;&lt;SPAN class="userSuppliedValue"&gt;format&lt;/SPAN&gt;.&lt;/DT&gt;&lt;DD class="argumentDescription"&gt;&lt;P class="paraSimpleFirst"&gt;contains the SAS format that you want applied to the value that is specified in the source. This argument must be the name of a format with a period and optional width and decimal specifications, not a character constant, variable, or expression. By default, if the source is numeric, the resulting string is right aligned, and if the source is character, the result is left aligned. To override the default alignment, you can add an alignment specification to a format:&lt;/P&gt;&lt;P class="listValueDescription"&gt;&lt;/P&gt;&lt;TABLE cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="value"&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt;"&gt;&lt;STRONG&gt;-L&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG style="color: #ff0000; font-size: 12pt;"&gt;left aligns the value.&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="value"&gt;-C&lt;/TD&gt;&lt;TD&gt;centers the value.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="value"&gt;-R&lt;/TD&gt;&lt;TD&gt;right aligns the value.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="paraSimple"&gt;&lt;A name="p0jhy2r66t02wvn1o2stsbrq1p4d"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P class="summary"&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN class="restriction"&gt;Restriction:&lt;/SPAN&gt;The &lt;SPAN class="userSuppliedValue"&gt;format&lt;/SPAN&gt;. must be of the same type as the source, either character or numeric. That is, if the source is character, the format name must begin with a dollar sign, but if the source is numeric, the format name must not begin with a dollar sign.&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DD&gt;&lt;/DL&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Dec 2013 17:30:05 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2013-12-19T17:30:05Z</dc:date>
    <item>
      <title>PUT Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178282#M45532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;could someone explain to me why we have to write the format and -l while we are converting Numeric to charecter(using PUT)&amp;nbsp; in the below example??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HAVE&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp; SCORES(numeric)&lt;/P&gt;&lt;P&gt;10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;14&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt; set have;&lt;/P&gt;&lt;P&gt; length _scores&amp;nbsp;&amp;nbsp; $ 20;&lt;/P&gt;&lt;P&gt; _scores=put(scores,&lt;SPAN style="color: #ff0000;"&gt;20. -l&lt;/SPAN&gt; );&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 17:03:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178282#M45532</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-12-19T17:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: PUT Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178283#M45533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;RTM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2 class="title"&gt;Syntax&lt;/H2&gt;&lt;P class="syntaxSimple"&gt;&lt;/P&gt;&lt;DIV class="syntaxLevel"&gt;&lt;DIV class="syntaxLevel"&gt;&lt;SPAN class="keyword"&gt;PUT&lt;/SPAN&gt;(&lt;SPAN class="userSuppliedSyntaxValue"&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/n0mlfb88dkhbmun1x08qbh5xbs7e.htm#p04xmxs2j5ayzpn1ilorfb2gvxhl" title="Description of syntax: source"&gt;source&lt;/A&gt;&lt;/SPAN&gt;, &lt;SPAN class="userSuppliedSyntaxValue"&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/n0mlfb88dkhbmun1x08qbh5xbs7e.htm#p0wfflof7qhl7in1cv1pagjhakip" title="Description of syntax: format."&gt;format&lt;/A&gt;&lt;/SPAN&gt;.)&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P class="syntaxDescription"&gt;&lt;/P&gt;&lt;DIV class="requiredArgGroup"&gt;&lt;H3 class="title"&gt;&lt;A name="p1q9ej8qvt518yn1b86x0v7dxvew"&gt;&lt;/A&gt;Required Arguments&lt;/H3&gt;&lt;A name="p04xmxs2j5ayzpn1ilorfb2gvxhl"&gt;&lt;/A&gt;&lt;DL class="argDescriptionPair"&gt;&lt;DT class="argument"&gt;&lt;SPAN class="userSuppliedValue"&gt;source&lt;/SPAN&gt;&lt;/DT&gt;&lt;DD class="argumentDescription"&gt;&lt;DIV class="paraSimpleFirst"&gt;identifies the constant, variable, or expression whose value you want to reformat. The &lt;SPAN class="userSuppliedValue"&gt;source&lt;/SPAN&gt;argument can be character or numeric.&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DD&gt;&lt;/DL&gt;&lt;A name="p0wfflof7qhl7in1cv1pagjhakip"&gt;&lt;/A&gt;&lt;DL class="argDescriptionPair"&gt;&lt;DT class="argument"&gt;&lt;SPAN class="userSuppliedValue"&gt;format&lt;/SPAN&gt;.&lt;/DT&gt;&lt;DD class="argumentDescription"&gt;&lt;P class="paraSimpleFirst"&gt;contains the SAS format that you want applied to the value that is specified in the source. This argument must be the name of a format with a period and optional width and decimal specifications, not a character constant, variable, or expression. By default, if the source is numeric, the resulting string is right aligned, and if the source is character, the result is left aligned. To override the default alignment, you can add an alignment specification to a format:&lt;/P&gt;&lt;P class="listValueDescription"&gt;&lt;/P&gt;&lt;TABLE cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="value"&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt;"&gt;&lt;STRONG&gt;-L&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG style="color: #ff0000; font-size: 12pt;"&gt;left aligns the value.&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="value"&gt;-C&lt;/TD&gt;&lt;TD&gt;centers the value.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="value"&gt;-R&lt;/TD&gt;&lt;TD&gt;right aligns the value.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="paraSimple"&gt;&lt;A name="p0jhy2r66t02wvn1o2stsbrq1p4d"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P class="summary"&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN class="restriction"&gt;Restriction:&lt;/SPAN&gt;The &lt;SPAN class="userSuppliedValue"&gt;format&lt;/SPAN&gt;. must be of the same type as the source, either character or numeric. That is, if the source is character, the format name must begin with a dollar sign, but if the source is numeric, the format name must not begin with a dollar sign.&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DD&gt;&lt;/DL&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 17:30:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178283#M45533</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-12-19T17:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: PUT Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178284#M45534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't have to.&amp;nbsp; Do you know what -L does?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 17:30:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178284#M45534</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-12-19T17:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: PUT Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178285#M45535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Thanks for the responses...&lt;/P&gt;&lt;P&gt;I was also wondering : the _scores variable is charecter in the WANT dataset and still has the dots instead of SPACES!!!!&lt;/P&gt;&lt;P&gt;ALSO does it matter during analysis for either alligning it Left or center or right?????&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 17:35:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178285#M45535</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-12-19T17:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: PUT Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178286#M45536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why are you converting this perfectly good numeric variable to character anyway.&amp;nbsp; I can see no avantage to that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 17:57:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178286#M45536</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-12-19T17:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: PUT Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178287#M45537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bcos i want to categorize based on this variable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 17:59:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178287#M45537</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-12-19T17:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: PUT Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178288#M45538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't need to convert to character to use is as categorical variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 18:01:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178288#M45538</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-12-19T18:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: PUT Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178289#M45539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting. I will also check my code again to verify if the numeric variable can also be grouped in the REPORT&lt;/P&gt;&lt;P&gt;May be in this case it is converted to charecter only because of the report&amp;nbsp; presentation .to show it to the left instead of the right side.&lt;/P&gt;&lt;P&gt;Do u agree??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 18:05:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178289#M45539</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-12-19T18:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: PUT Function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178290#M45540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doesn't Proc report allow you to justify the data, left/right/center?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 18:09:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PUT-Function/m-p/178290#M45540</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-12-19T18:09:16Z</dc:date>
    </item>
  </channel>
</rss>

