<?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: FORMAT function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176511#M33809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since SAS did not convert this particular SCL function into a foundation SAS function, you might need to instead query the dictionary table FORMATS (or the view SASHELP.VFORMAT).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Dec 2013 16:11:56 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2013-12-18T16:11:56Z</dc:date>
    <item>
      <title>FORMAT function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176508#M33806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to do checks over format variables. To do that, I have found a function in SASHelp named &lt;SPAN class="strong" style="font-size: 10pt; line-height: 1.5em;"&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="emph" style="font-size: 10pt; line-height: 1.5em;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="emph" style="font-size: 10pt; line-height: 1.5em;"&gt;type&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;) that gives 1 if the format is valid or 0 otherwise. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I'm executing the following code SAS don't recognize the FORMAT function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _NULL_;&lt;/P&gt;&lt;P&gt;rc=format('$char12.','c');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;give the next error.&lt;/P&gt;&lt;P&gt;25&amp;nbsp;&amp;nbsp; rc=format('$char12.','c');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 68&lt;/P&gt;&lt;P&gt;ERROR 68-185: The function FORMAT is unknown, or cannot be accessed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There you know, how solve this error or sugest other way to check if a format is valid?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any tip or help will be welcome.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 10:21:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176508#M33806</guid>
      <dc:creator>arodriguez</dc:creator>
      <dc:date>2013-12-18T10:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176509#M33807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was unable to find a function called "Format" in the Language Elements documentation. Do you have a link to the documentation for it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 12:24:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176509#M33807</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2013-12-18T12:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176510#M33808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is part of the SAS Component Language (SCL) which I don't think is valid in BASE SAS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A name="a000675447"&gt;&lt;/A&gt;SAS Component Language (SCL) is a programming language designed to facilitate the development of interactive applications using the SAS System. For example, you can use SCL with other SAS software to create data entry applications, to display tables and menus, and to generate and submit SAS source code. SCL is the scripting language behind SAS/AF, SAS/FSP, and SAS/EIS software. Applications developed using SCL with SAS/AF software can be run by users who have only licensed Base SAS software. Previous to Version 7, SAS Component Language was known as SAS Screen Control Language.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 15:38:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176510#M33808</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-12-18T15:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176511#M33809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since SAS did not convert this particular SCL function into a foundation SAS function, you might need to instead query the dictionary table FORMATS (or the view SASHELP.VFORMAT).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 16:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176511#M33809</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-12-18T16:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176512#M33810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you define 'if a format is valid'?&amp;nbsp; Are you asking if a format simply exists, or if a format can be applied to a variable legally, or if a format makes sense with a variable's contents, or something else?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 17:06:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176512#M33810</guid>
      <dc:creator>snoopy369</dc:creator>
      <dc:date>2013-12-18T17:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176513#M33811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Among the user defined formats no min/max widths are defined on SASHELP.VFORMAT. However there will be corresponding limits stored in the format catalog. So all formats and informats have limits to their validity. &lt;/P&gt;&lt;P&gt;Also data might not be "of a valid format" especially where it is collected "manually" like in excel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 00:02:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176513#M33811</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2013-12-19T00:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176514#M33812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to know if a given format exist or not. I'm trying to do a macro and one of the parameters is a format, I'm trying to validate if this given format exist before applied. For example, the parameter can be 20 that is not a correct format value, it needs a dot. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 12:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176514#M33812</guid>
      <dc:creator>arodriguez</dc:creator>
      <dc:date>2013-12-19T12:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176515#M33813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found it in the local help, so i only can attach you this&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="4648" alt="Captura.PNG" class="jive-image-thumbnail jive-image jiveImage" src="https://communities.sas.com/legacyfs/online/4648_Captura.PNG" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 12:55:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176515#M33813</guid>
      <dc:creator>arodriguez</dc:creator>
      <dc:date>2013-12-19T12:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176516#M33814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;select fmtname into :foundf separated by ' '&lt;/P&gt;&lt;P&gt;from sashelp.vformat&lt;/P&gt;&lt;P&gt;where fmtname = "%upcase(&amp;amp;your_fmt_parm)"&lt;/P&gt;&lt;P&gt;&amp;nbsp; and fmttype&amp;nbsp; ="F"&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;Then the value of &amp;amp;sqlobs will be 0 if there are&amp;nbsp; no formats matching what is in &amp;amp;your_fmt_parm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course this crosses the "step-boundary" which might be significant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It also assumes you have stripped out the length and decimal width from the format parameter and that you want to check for formats rather than informats.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 14:00:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176516#M33814</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2013-12-19T14:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: FORMAT function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176517#M33815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, this can be very usefull. I'm gonna try to cut the length and decimals to apply this test.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 08:26:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FORMAT-function/m-p/176517#M33815</guid>
      <dc:creator>arodriguez</dc:creator>
      <dc:date>2013-12-20T08:26:21Z</dc:date>
    </item>
  </channel>
</rss>

