<?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: How do I use PROC FORMAT for sas7bdat data? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544361#M150546</link>
    <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;, I have taken the INPUT statement out. How do I create INFO in the library? What am I missing?</description>
    <pubDate>Tue, 19 Mar 2019 20:21:50 GMT</pubDate>
    <dc:creator>JUMMY</dc:creator>
    <dc:date>2019-03-19T20:21:50Z</dc:date>
    <item>
      <title>How do I use PROC FORMAT for sas7bdat data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544325#M150526</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a sas data (sas7bdat) of the form below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 0 336&lt;BR /&gt;1 0 346&lt;BR /&gt;0 1 269&lt;BR /&gt;0 1 346&lt;BR /&gt;1 0 323&lt;BR /&gt;1 0 309&lt;BR /&gt;0 1 322&lt;BR /&gt;0 1 316&lt;BR /&gt;1 0 300&lt;BR /&gt;1 0 309&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I use proc format to edit the first two columns?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
  value fxx 1='High' 0='Low';
  value fxxxx 1='Yes' 0='No';
run;


libname info 'where data is stored';

data have;
	set info.have;
	input xx xxxx sbp;
	format xx fxx. xxxx fxxxx.;
	run;

proc print data=have;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;7    libname info 'where data is stored';
NOTE: Libref info was successfully assigned as follows:
      Engine:        V9
      Physical Name: where data is stored
8
9    data have;
10   *Use SET statement to set the permanent SAS data set;
11       set info.have;
ERROR: File INFO.HAVE.DATA does not exist.
12       input xx xxxx sbp;
13       format xx fxx. xxxx fxxxx.;
14       run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.HAVE may be incomplete.  When this step was stopped there were 0
         observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds


15
16   *Use PROC PRINT to read the data carefully;
17   proc print data=have;
NOTE: Writing HTML Body file: sashtml.htm
ERROR: File WORK.HAVE.DATA does not exist.
18   run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.58 seconds
      cpu time            0.09 seconds&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;I keep getting the same error above. I am trying to import the data from sas and then use proc format to make changes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Why do I still have column 1 and 2 not formatted? What am I missing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 20:14:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544325#M150526</guid>
      <dc:creator>JUMMY</dc:creator>
      <dc:date>2019-03-19T20:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use PROC FORMAT for sas7bdat data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544327#M150528</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/226541"&gt;@JUMMY&lt;/a&gt;&amp;nbsp; &amp;nbsp;Your code works&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
input var1-var3;
cards;
1 0 336
1 0 346
0 1 269
0 1 346
1 0 323
1 0 309
0 1 322
0 1 316
1 0 300
1 0 309
;

proc format;
  value fxx 1='High' 0='Low';
  value fxxxx 1='Yes' 0='No';
run;




data have;
	set have;
	format var1 fxx. var2 fxxxx.;
	run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Mar 2019 19:08:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544327#M150528</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-03-19T19:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use PROC FORMAT for sas7bdat data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544328#M150529</link>
      <description>&lt;P&gt;Are there errors in your SAS log? There are when I run this code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 19:08:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544328#M150529</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-19T19:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use PROC FORMAT for sas7bdat data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544330#M150531</link>
      <description>&lt;P&gt;I think the error is your input statement which i removed&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 19:10:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544330#M150531</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-03-19T19:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use PROC FORMAT for sas7bdat data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544355#M150544</link>
      <description>&lt;PRE&gt;7    libname info 'where data is stored';
NOTE: Libref info was successfully assigned as follows:
      Engine:        V9
      Physical Name: where data is stored
8
9    data have;
10   *Use SET statement to set the permanent SAS data set;
11       set info.have;
&lt;STRONG&gt;ERROR: File INFO.HAVE.DATA does not exist.&lt;/STRONG&gt;
12       input xx xxxx sbp;
13       format xx fxx. xxxx fxxxx.;
14       run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.HAVE may be incomplete.  When this step was stopped there were 0
         observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds


15
16   *Use PROC PRINT to read the data carefully;
17   proc print data=have;
NOTE: Writing HTML Body file: sashtml.htm
ERROR: File WORK.HAVE.DATA does not exist.
18   run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.58 seconds
      cpu time            0.09 seconds&lt;/PRE&gt;&lt;P&gt;I keep getting the same error above. I am trying to import the data from sas and then use proc format to make changes.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 20:12:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544355#M150544</guid>
      <dc:creator>JUMMY</dc:creator>
      <dc:date>2019-03-19T20:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use PROC FORMAT for sas7bdat data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544359#M150545</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/226541"&gt;@JUMMY&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;PRE&gt;7    libname info 'where data is stored';
NOTE: Libref info was successfully assigned as follows:
      Engine:        V9
      Physical Name: where data is stored
8
9    data have;
10   *Use SET statement to set the permanent SAS data set;
11       set info.have;
&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ERROR: File INFO.HAVE.DATA does not exist.&lt;/STRONG&gt;&lt;/FONT&gt;
12       input xx xxxx sbp;
13       format xx fxx. xxxx fxxxx.;
14       run;

NOTE: The SAS System stopped processing this step because of errors.
&lt;FONT color="#000000"&gt;WARNING: The data set WORK.HAVE may be incomplete.  When this step was stopped there were 0
         observations and 2 variables.&lt;/FONT&gt;
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;There is no such SAS data set named HAVE in library INFO. So you can't perform this DATA step. As mentioned by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;, you also can't have an INPUT statement in DATA HAVE&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 20:19:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544359#M150545</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-19T20:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use PROC FORMAT for sas7bdat data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544361#M150546</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;, I have taken the INPUT statement out. How do I create INFO in the library? What am I missing?</description>
      <pubDate>Tue, 19 Mar 2019 20:21:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544361#M150546</guid>
      <dc:creator>JUMMY</dc:creator>
      <dc:date>2019-03-19T20:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use PROC FORMAT for sas7bdat data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544389#M150556</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/226541"&gt;@JUMMY&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;PRE&gt;7    libname info 'where data is stored';
NOTE: Libref info was successfully assigned as follows:
      Engine:        V9
      Physical Name: where data is stored
8
9    data have;
10   *Use SET statement to set the permanent SAS data set;
11       set info.have;
&lt;STRONG&gt;ERROR: File INFO.HAVE.DATA does not exist.&lt;/STRONG&gt;
12       input xx xxxx sbp;
13       format xx fxx. xxxx fxxxx.;
14       run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.HAVE may be incomplete.  When this step was stopped there were 0
         observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.03 seconds


15
16   *Use PROC PRINT to read the data carefully;
17   proc print data=have;
NOTE: Writing HTML Body file: sashtml.htm
ERROR: File WORK.HAVE.DATA does not exist.
18   run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.58 seconds
      cpu time            0.09 seconds&lt;/PRE&gt;
&lt;P&gt;I keep getting the same error above. I am trying to import the data from sas and then use proc format to make changes.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Have you created a LIBRARY named INFO? Yes.&lt;/P&gt;
&lt;P&gt;Does the library contain a data set named HAVE??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Syntax of&lt;/P&gt;
&lt;PRE&gt;set info.have;
&lt;/PRE&gt;
&lt;P&gt;basically means "read data from a data set named "have" in a&amp;nbsp;library named "info".&lt;/P&gt;
&lt;P&gt;If you have not created the library=&amp;gt; Error&lt;/P&gt;
&lt;P&gt;if the library does not have a data set with that name=&amp;gt;&lt;/P&gt;
&lt;P&gt;And the error will be "does not exist" in either case.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 21:54:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544389#M150556</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-19T21:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use PROC FORMAT for sas7bdat data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544475#M150585</link>
      <description>&lt;P&gt;This&lt;/P&gt;
&lt;PRE&gt;11       set info.have;
ERROR: File INFO.HAVE.DATA does not exist.
&lt;/PRE&gt;
&lt;P&gt;very clearly tells you that you NOT have a dataset called HAVE in library INFO.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The input statement reads from external data sources, not from SAS datasets. It is useless without a corresponding infile statement that defines access to that external data source.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you do not have any problem with a format, but with the existence of datasets in the first place. From where do you infer that the dataset have should exist, or do you have non-SAS data that needs to be read into a dataset first?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I strongly suggest that you spend the time and work through the (free!) online SAS Programming 1 course, as that will allow you to avoid the simple mistakes you are currently fighting with.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 08:02:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544475#M150585</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-03-20T08:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use PROC FORMAT for sas7bdat data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544497#M150592</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/226541"&gt;@JUMMY&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;, I have taken the INPUT statement out. How do I create &lt;STRIKE&gt;INFO&lt;/STRIKE&gt; &lt;FONT color="#FF0000"&gt;HAVE&lt;/FONT&gt;&amp;nbsp;in the library? What am I missing?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The same way you create other data sets&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data info.have;
    /* DATA step code goes here to create the data set */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Of course, the related problem is: you should not be writing code to access a data set (INFO.HAVE) that does not exist.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I strongly agree with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;that you need to take some time and learn basic programming concepts via the FREE online video he mentions.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 12:28:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-use-PROC-FORMAT-for-sas7bdat-data/m-p/544497#M150592</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-20T12:28:31Z</dc:date>
    </item>
  </channel>
</rss>

