<?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 ( ) in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/put/m-p/76434#M22162</link>
    <description>As long as eloc_loan_num is a character variable the z10. will put the number in as character keeping leading zeros.</description>
    <pubDate>Wed, 21 Oct 2009 17:44:38 GMT</pubDate>
    <dc:creator>Flip</dc:creator>
    <dc:date>2009-10-21T17:44:38Z</dc:date>
    <item>
      <title>put ( )</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/put/m-p/76432#M22160</link>
      <description>Hello all,&lt;BR /&gt;
&lt;BR /&gt;
I thougth the PUT( ) function converts a variable from numeric to character.  Am I wrong? &lt;BR /&gt;
&lt;BR /&gt;
Does the following code convert a variable from numeric to character?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
if Loan_No2 ne ' ' and loan_no2 ne 'NULL' then do;&lt;BR /&gt;
   numer_eloc_loan_num=Loan_No2;&lt;BR /&gt;
   eloc_loan_num=put(numer_eloc_loan_num,z10.);&lt;BR /&gt;
end;&lt;BR /&gt;
else do;&lt;BR /&gt;
   numer_eloc_loan_num=0;&lt;BR /&gt;
   eloc_loan_num=put(numer_eloc_loan_num,z10.);&lt;BR /&gt;
   end;&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any input !</description>
      <pubDate>Wed, 21 Oct 2009 17:34:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/put/m-p/76432#M22160</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2009-10-21T17:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: put ( )</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/put/m-p/76433#M22161</link>
      <description>I guess I am confused about the "z10" in the ( ).  Z10 (numeric) is the format being converted from.  Is that right?&lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
      <pubDate>Wed, 21 Oct 2009 17:39:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/put/m-p/76433#M22161</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2009-10-21T17:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: put ( )</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/put/m-p/76434#M22162</link>
      <description>As long as eloc_loan_num is a character variable the z10. will put the number in as character keeping leading zeros.</description>
      <pubDate>Wed, 21 Oct 2009 17:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/put/m-p/76434#M22162</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2009-10-21T17:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: put ( )</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/put/m-p/76435#M22163</link>
      <description>put function will return a character representation of a numeric OR character value (variable, constant or expression) using a specified format (which must match with the source type value).&lt;BR /&gt;
&lt;BR /&gt;
Things to remind:&lt;BR /&gt;
- put function always returns a character value.&lt;BR /&gt;
- the format specified must be of the same type of the source value.&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
X=put('XXXXX',$2.); * char to char;&lt;BR /&gt;
Y=put(23,Z5.); * num to char;&lt;BR /&gt;
put _all_;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Check the online documentation here:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000199354.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000199354.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Cheers from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos @ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;</description>
      <pubDate>Thu, 22 Oct 2009 08:12:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/put/m-p/76435#M22163</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2009-10-22T08:12:00Z</dc:date>
    </item>
  </channel>
</rss>

