<?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: build dataset from proc format values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/build-dataset-from-proc-format-values/m-p/773367#M245674</link>
    <description>Thank you so much!!!! Th question is why a dot after format name will prevent getting the result ?</description>
    <pubDate>Mon, 11 Oct 2021 11:33:57 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2021-10-11T11:33:57Z</dc:date>
    <item>
      <title>build dataset from proc format values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/build-dataset-from-proc-format-values/m-p/773356#M245667</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to&amp;nbsp;build dataset from format(put the formats values from proc format into a data set).&lt;/P&gt;
&lt;P&gt;This is the error I get&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;38 proc format cntlout= FormatDef(keep= Start rename=(Start = Category));&lt;BR /&gt;39 select $AgePratiVF.;&lt;BR /&gt;____________&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, $, @.&lt;/P&gt;
&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value $AgeFmt
Other ='(a) Null'
'less 25'='(b) less 25'
'26-31'='(c) 26-31'
'32-42'='(d) 32-42'
'43-67'='(e) 43-67'
'more 67'='(f) more 67'
'All Other'='(g) All Other'
;
Run;

proc format cntlout= FormatDef(keep= Start rename=(Start = Category));
 select  $AgeFmt.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 11:05:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/build-dataset-from-proc-format-values/m-p/773356#M245667</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-10-11T11:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: build dataset from proc format values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/build-dataset-from-proc-format-values/m-p/773358#M245668</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to&amp;nbsp;build dataset from format(put the formats values from proc format into a data set).&lt;/P&gt;
&lt;P&gt;This is the error I get&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;38 proc format cntlout= FormatDef(keep= Start rename=(Start = Category));&lt;BR /&gt;39 select $AgePratiVF.;&lt;BR /&gt;____________&lt;BR /&gt;22&lt;BR /&gt;200&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, $, @.&lt;/P&gt;
&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please format your logs properly, so we can know what part of the code is actually underlined. You do this by pasting the log into the window that appears when you click on the &amp;lt;/&amp;gt; icon. I am dismayed that after you have been in the SAS Communities for years now, you aren't doing this automatically.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 11:08:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/build-dataset-from-proc-format-values/m-p/773358#M245668</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-11T11:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: build dataset from proc format values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/build-dataset-from-proc-format-values/m-p/773361#M245670</link>
      <description>&lt;PRE&gt;37         proc format cntlout= FormatDef(keep= Start rename=(Start = Category));
2                                                          The SAS System                             14:12 Monday, October 11, 2021

38          select  $AgeFmt.;
                    ________
                    22
                    200
ERROR 22-322: Syntax error, expecting one of the following: a name, $, @.  

ERROR 200-322: The symbol is not recognized and will be ignored.

NOTE: The previous statement has been deleted.
39         run;

NOTE: PROCEDURE FORMAT used (Total process time):
      real time           0.01 seconds
      user cpu time       0.00 seconds
      system cpu time     0.01 seconds
      memory              360.50k
      OS Memory           18592.00k
      Timestamp           10/11/2021 02:12:54 PM
      Step Count                        3  Switch Count  1
      Page Faults                       0
      Page Reclaims                     92
      Page Swaps                        0
      Voluntary Context Switches        41
      Involuntary Context Switches      0
      Block Input Operations            0
      Block Output Operations           0
      
NOTE: Compression was disabled for data set WORK.FORMATDEF because compression overhead would increase the size of the data set.
NOTE: No formats found that match SELECT statement.
NOTE: The data set WORK.FORMATDEF has 0 observations and 1 variables.
NOTE: The SAS System stopped processing this step because of errors.
40         
41         GOPTIONS NOACCESSIBLE;
42         %LET _CLIENTTASKLABEL=;
43         %LET _CLIENTPROCESSFLOWNAME=;
44         %LET _CLIENTPROJECTPATH=;
45         %LET _CLIENTPROJECTPATHHOST=;
46         %LET _CLIENTPROJECTNAME=;
47         %LET _SASPROGRAMFILE=;
48         %LET _SASPROGRAMFILEHOST=;
49         
50         ;*';*";*/;quit;run;
51         ODS _ALL_ CLOSE;
52         
53         
54         QUIT; RUN;
55         
&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Oct 2021 11:13:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/build-dataset-from-proc-format-values/m-p/773361#M245670</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-10-11T11:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: build dataset from proc format values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/build-dataset-from-proc-format-values/m-p/773362#M245671</link>
      <description>&lt;P&gt;The &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/p13qw1bnotx0gon14dvyt7n6zop8.htm#n0g60831kl410en1aslskysq97yp" target="_self"&gt;documentation&lt;/A&gt; provides the answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No dot after the format name.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 11:20:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/build-dataset-from-proc-format-values/m-p/773362#M245671</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-11T11:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: build dataset from proc format values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/build-dataset-from-proc-format-values/m-p/773367#M245674</link>
      <description>Thank you so much!!!! Th question is why a dot after format name will prevent getting the result ?</description>
      <pubDate>Mon, 11 Oct 2021 11:33:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/build-dataset-from-proc-format-values/m-p/773367#M245674</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-10-11T11:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: build dataset from proc format values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/build-dataset-from-proc-format-values/m-p/773368#M245675</link>
      <description>&lt;P&gt;Since I didn't design or create the SAS language ... I can only guess.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a DATA step, you have to indicate somehow that you are referring to a format and not a variable name, the dot tells SAS you mean a format and no dot tells SAS you mean a variable name. In PROC FORMAT, the SELECT statement only can refer to formats, not variable names, so not dot needed (and in fact a dot is wrong).&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 11:37:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/build-dataset-from-proc-format-values/m-p/773368#M245675</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-11T11:37:29Z</dc:date>
    </item>
  </channel>
</rss>

