<?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 Require proper format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Require-proper-format/m-p/898269#M355031</link>
    <description>&lt;P&gt;I want to read below column from input file and display them in the format specified..I want to write the sas format with below information .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;column&amp;nbsp; &amp;nbsp; datatype&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;logical_datatype&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; length&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; format&lt;/P&gt;
&lt;P&gt;ccy_ccd&amp;nbsp; &amp;nbsp; &amp;nbsp; string&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;text&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $3.00&lt;/P&gt;
&lt;P&gt;--------&lt;/P&gt;
&lt;P&gt;PROC SQL;&lt;/P&gt;
&lt;P&gt;create table template (&lt;/P&gt;
&lt;P&gt;ccy_ccd char(3) format=??&lt;/P&gt;
&lt;P&gt;);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Oct 2023 11:28:09 GMT</pubDate>
    <dc:creator>Sathya3</dc:creator>
    <dc:date>2023-10-12T11:28:09Z</dc:date>
    <item>
      <title>Require proper format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Require-proper-format/m-p/898269#M355031</link>
      <description>&lt;P&gt;I want to read below column from input file and display them in the format specified..I want to write the sas format with below information .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;column&amp;nbsp; &amp;nbsp; datatype&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;logical_datatype&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; length&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; format&lt;/P&gt;
&lt;P&gt;ccy_ccd&amp;nbsp; &amp;nbsp; &amp;nbsp; string&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;text&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $3.00&lt;/P&gt;
&lt;P&gt;--------&lt;/P&gt;
&lt;P&gt;PROC SQL;&lt;/P&gt;
&lt;P&gt;create table template (&lt;/P&gt;
&lt;P&gt;ccy_ccd char(3) format=??&lt;/P&gt;
&lt;P&gt;);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 11:28:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Require-proper-format/m-p/898269#M355031</guid>
      <dc:creator>Sathya3</dc:creator>
      <dc:date>2023-10-12T11:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Require proper format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Require-proper-format/m-p/898272#M355034</link>
      <description>&lt;P&gt;You don't need a format for character variables. SAS will always display all characters.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 11:36:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Require-proper-format/m-p/898272#M355034</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-10-12T11:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Require proper format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Require-proper-format/m-p/898273#M355035</link>
      <description>&lt;P&gt;So the value would contain dollar amounts?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any reason it isn't numeric?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 11:38:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Require-proper-format/m-p/898273#M355035</guid>
      <dc:creator>maguiremq</dc:creator>
      <dc:date>2023-10-12T11:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Require proper format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Require-proper-format/m-p/898274#M355036</link>
      <description>&lt;P&gt;It looks like a currency code..rather than a number&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 11:47:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Require-proper-format/m-p/898274#M355036</guid>
      <dc:creator>Sathya3</dc:creator>
      <dc:date>2023-10-12T11:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Require proper format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Require-proper-format/m-p/898275#M355037</link>
      <description>&lt;P&gt;If it contains values like "USD" or "EUR", then positively no format is needed.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 11:54:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Require-proper-format/m-p/898275#M355037</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-10-12T11:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Require proper format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Require-proper-format/m-p/898284#M355041</link>
      <description>&lt;P&gt;To store up to three bytes you need to define the variable to have a LENGTH of 3.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attaching a format to it is not that important. Formats are special instructions for printing/displaying the values.&amp;nbsp; You do not need to give SAS any special instructions for displaying normal character values.&amp;nbsp; But if you did want to attach a format (perhaps to remove a mistakenly attached format since PROC SQL has no syntax for removing formats from variables) then just use the normal $ format with a width of 3.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Character formats do not allow for decimal places (what would it even mean?) so it is not clear why your description has that extra 00 in the format column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In normal SAS code it might look like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  length ccy_ccd $3 ;
  format ccy_ccd $3. ;
....&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 12:31:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Require-proper-format/m-p/898284#M355041</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-10-12T12:31:21Z</dc:date>
    </item>
  </channel>
</rss>

