<?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 data step error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/data-step-error/m-p/328641#M73381</link>
    <description>&lt;DIV class="txt-2-small global-breadcrumb"&gt;&lt;A href="http://www.chegg.com/" target="_blank"&gt;home&lt;/A&gt; / &lt;A href="http://www.chegg.com/study" target="_blank"&gt;study&lt;/A&gt; / &lt;A href="http://www.chegg.com/homework-help/math" target="_blank"&gt;math&lt;/A&gt; / &lt;A href="http://www.chegg.com/homework-help/math-statistics-and-probability-s31" target="_blank"&gt;statistics and probability&lt;/A&gt; / &lt;A href="http://www.chegg.com/homework-help/questions-and-answers/statistics-and-probability-archive" target="_blank"&gt;questions and answers&lt;/A&gt; / please help in sas... (this is the data from the ...&lt;/DIV&gt;
&lt;DIV class="dialog-question" data-qid="18035662"&gt;
&lt;DIV class="question txt-small" data-commentingid="18035662"&gt;
&lt;DIV class="metadata question-header"&gt;
&lt;H1&gt;&lt;EM&gt;Question&lt;/EM&gt;: Please help in SAS... (this is the data from the d...&lt;/H1&gt;
&lt;/DIV&gt;
&lt;HR /&gt;
&lt;DIV class="txt-body question-body"&gt;
&lt;DIV class="question-toolbar"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="ugc-base question-body-text"&gt;
&lt;DIV class=""&gt;
&lt;P&gt;Please help in SAS...&lt;/P&gt;
&lt;P&gt;(this is the data from the dat file) The info for golf.dat is the one below&lt;/P&gt;
&lt;P&gt;Kapalua Plantation &lt;A&gt;18 73 7263 125.00&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Pukalani&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;&amp;nbsp; &lt;A&gt;18 72 6945 55.00&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Sandlewood&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A&gt;18 72 6469 35.00&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Silversword&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;18 71 &amp;nbsp;&amp;nbsp;&amp;nbsp;.&amp;nbsp;&amp;nbsp;&amp;nbsp; 57.00&lt;/P&gt;
&lt;P&gt;Waiehu Municipal&amp;nbsp;&amp;nbsp;&lt;A&gt;18 72 6330 25.00&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Grand Waikapa &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A&gt;18 72 6122 200.00&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Read the data contained in the golf.dat&lt;IMG src="https://psu.instructure.com/images/preview.png" border="0" alt="Preview the document" /&gt;&lt;IMG src="https://psu.instructure.com/images/popout.png" border="0" alt="View in a new window" /&gt; file &lt;STRONG&gt;using a DATALINES statement&lt;/STRONG&gt; into a &lt;STRONG&gt;permanent&lt;/STRONG&gt; SAS data set called &lt;EM&gt;question02&lt;/EM&gt;. The data in each record are in order: golf course (&lt;EM&gt;name&lt;/EM&gt;), number of holes (&lt;EM&gt;holes&lt;/EM&gt;), par (&lt;EM&gt;par&lt;/EM&gt;), total yardage (&lt;EM&gt;yardage&lt;/EM&gt;), and greens fees (&lt;EM&gt;fees&lt;/EM&gt;). Print the resulting SAS data set ensuring that the output is centered, your page size is no larger than 58 lines, and the linesize no longer than 80 characters. When you print the data set, do what you need to do, to make it look (exactly) like this:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://d2vlcm61l7u1fs.cloudfront.net/media%2Faa6%2Faa600cb9-1c0f-4271-9370-c25df5317ee3%2FphpeJ7haY.png" border="0" alt="" /&gt;&lt;/P&gt;
&lt;P&gt;That is: (1) double space your output, (2) label the variables as in the above output, (3) title the output as it appears above, (4) suppress the printing of the observation number, and (5) make sure that the &lt;EM&gt;yardage&lt;/EM&gt; contains a comma (&lt;EM&gt;e.g.&lt;/EM&gt;, 7,263) and the &lt;EM&gt;fees&lt;/EM&gt; are preceded by a dollar sign (&lt;EM&gt;e.g.&lt;/EM&gt;, $125.00).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The program I wrote&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname perm "C:\temp";&lt;/P&gt;
&lt;P&gt;data perm.question02:&lt;/P&gt;
&lt;P&gt;infile datalines dsd ;&lt;/P&gt;
&lt;P&gt;informat total_yardage fees;&lt;/P&gt;
&lt;P&gt;input&amp;nbsp;&amp;nbsp;golfcourse $ holes par total_yardage comma5. fees comma10.2;&lt;/P&gt;
&lt;P&gt;datalines;&lt;/P&gt;
&lt;P&gt;Kapalua Plantation 18 73 7263 125.00&lt;/P&gt;
&lt;P&gt;Pukalani&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;&amp;nbsp;&amp;nbsp;18 72 6945 55.00&lt;/P&gt;
&lt;P&gt;Sandlewood&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;18 72 6469 35.00&lt;/P&gt;
&lt;P&gt;Silversword&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;18 71 &amp;nbsp;&amp;nbsp;&amp;nbsp;.&amp;nbsp;&amp;nbsp;&amp;nbsp; 57.00&lt;/P&gt;
&lt;P&gt;Waiehu Municipal&amp;nbsp;&amp;nbsp;18 72 6330 25.00&lt;/P&gt;
&lt;P&gt;Grand Waikapa &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;18 72 6122 200.0&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Double&lt;/STRONG&gt; - double spaces the printed output.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Noobs&lt;/STRONG&gt; - suppresses the observation number in the output.&lt;/P&gt;
&lt;P&gt;Program2&lt;/P&gt;
&lt;P&gt;titile "Question#2";&lt;/P&gt;
&lt;P&gt;proc print data =question02 double noobs;&lt;/P&gt;
&lt;P&gt;var golfcourse par holes&amp;nbsp;&amp;nbsp; total_yardage fees ;&lt;/P&gt;
&lt;P&gt;label par ='Par' holes='No. of holes' total_yardage='Yardage' fees='Greens_Fees';&lt;/P&gt;
&lt;P&gt;format &amp;nbsp;&amp;nbsp;total_yardage comma5. fees comma10.2;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;I am getting error&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 31 Jan 2017 05:07:41 GMT</pubDate>
    <dc:creator>venkatnaveen</dc:creator>
    <dc:date>2017-01-31T05:07:41Z</dc:date>
    <item>
      <title>data step error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step-error/m-p/328641#M73381</link>
      <description>&lt;DIV class="txt-2-small global-breadcrumb"&gt;&lt;A href="http://www.chegg.com/" target="_blank"&gt;home&lt;/A&gt; / &lt;A href="http://www.chegg.com/study" target="_blank"&gt;study&lt;/A&gt; / &lt;A href="http://www.chegg.com/homework-help/math" target="_blank"&gt;math&lt;/A&gt; / &lt;A href="http://www.chegg.com/homework-help/math-statistics-and-probability-s31" target="_blank"&gt;statistics and probability&lt;/A&gt; / &lt;A href="http://www.chegg.com/homework-help/questions-and-answers/statistics-and-probability-archive" target="_blank"&gt;questions and answers&lt;/A&gt; / please help in sas... (this is the data from the ...&lt;/DIV&gt;
&lt;DIV class="dialog-question" data-qid="18035662"&gt;
&lt;DIV class="question txt-small" data-commentingid="18035662"&gt;
&lt;DIV class="metadata question-header"&gt;
&lt;H1&gt;&lt;EM&gt;Question&lt;/EM&gt;: Please help in SAS... (this is the data from the d...&lt;/H1&gt;
&lt;/DIV&gt;
&lt;HR /&gt;
&lt;DIV class="txt-body question-body"&gt;
&lt;DIV class="question-toolbar"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="ugc-base question-body-text"&gt;
&lt;DIV class=""&gt;
&lt;P&gt;Please help in SAS...&lt;/P&gt;
&lt;P&gt;(this is the data from the dat file) The info for golf.dat is the one below&lt;/P&gt;
&lt;P&gt;Kapalua Plantation &lt;A&gt;18 73 7263 125.00&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Pukalani&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;&amp;nbsp; &lt;A&gt;18 72 6945 55.00&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Sandlewood&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A&gt;18 72 6469 35.00&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Silversword&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;18 71 &amp;nbsp;&amp;nbsp;&amp;nbsp;.&amp;nbsp;&amp;nbsp;&amp;nbsp; 57.00&lt;/P&gt;
&lt;P&gt;Waiehu Municipal&amp;nbsp;&amp;nbsp;&lt;A&gt;18 72 6330 25.00&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Grand Waikapa &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A&gt;18 72 6122 200.00&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Read the data contained in the golf.dat&lt;IMG src="https://psu.instructure.com/images/preview.png" border="0" alt="Preview the document" /&gt;&lt;IMG src="https://psu.instructure.com/images/popout.png" border="0" alt="View in a new window" /&gt; file &lt;STRONG&gt;using a DATALINES statement&lt;/STRONG&gt; into a &lt;STRONG&gt;permanent&lt;/STRONG&gt; SAS data set called &lt;EM&gt;question02&lt;/EM&gt;. The data in each record are in order: golf course (&lt;EM&gt;name&lt;/EM&gt;), number of holes (&lt;EM&gt;holes&lt;/EM&gt;), par (&lt;EM&gt;par&lt;/EM&gt;), total yardage (&lt;EM&gt;yardage&lt;/EM&gt;), and greens fees (&lt;EM&gt;fees&lt;/EM&gt;). Print the resulting SAS data set ensuring that the output is centered, your page size is no larger than 58 lines, and the linesize no longer than 80 characters. When you print the data set, do what you need to do, to make it look (exactly) like this:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://d2vlcm61l7u1fs.cloudfront.net/media%2Faa6%2Faa600cb9-1c0f-4271-9370-c25df5317ee3%2FphpeJ7haY.png" border="0" alt="" /&gt;&lt;/P&gt;
&lt;P&gt;That is: (1) double space your output, (2) label the variables as in the above output, (3) title the output as it appears above, (4) suppress the printing of the observation number, and (5) make sure that the &lt;EM&gt;yardage&lt;/EM&gt; contains a comma (&lt;EM&gt;e.g.&lt;/EM&gt;, 7,263) and the &lt;EM&gt;fees&lt;/EM&gt; are preceded by a dollar sign (&lt;EM&gt;e.g.&lt;/EM&gt;, $125.00).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The program I wrote&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname perm "C:\temp";&lt;/P&gt;
&lt;P&gt;data perm.question02:&lt;/P&gt;
&lt;P&gt;infile datalines dsd ;&lt;/P&gt;
&lt;P&gt;informat total_yardage fees;&lt;/P&gt;
&lt;P&gt;input&amp;nbsp;&amp;nbsp;golfcourse $ holes par total_yardage comma5. fees comma10.2;&lt;/P&gt;
&lt;P&gt;datalines;&lt;/P&gt;
&lt;P&gt;Kapalua Plantation 18 73 7263 125.00&lt;/P&gt;
&lt;P&gt;Pukalani&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;&amp;nbsp;&amp;nbsp;18 72 6945 55.00&lt;/P&gt;
&lt;P&gt;Sandlewood&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;18 72 6469 35.00&lt;/P&gt;
&lt;P&gt;Silversword&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;18 71 &amp;nbsp;&amp;nbsp;&amp;nbsp;.&amp;nbsp;&amp;nbsp;&amp;nbsp; 57.00&lt;/P&gt;
&lt;P&gt;Waiehu Municipal&amp;nbsp;&amp;nbsp;18 72 6330 25.00&lt;/P&gt;
&lt;P&gt;Grand Waikapa &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;18 72 6122 200.0&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Double&lt;/STRONG&gt; - double spaces the printed output.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Noobs&lt;/STRONG&gt; - suppresses the observation number in the output.&lt;/P&gt;
&lt;P&gt;Program2&lt;/P&gt;
&lt;P&gt;titile "Question#2";&lt;/P&gt;
&lt;P&gt;proc print data =question02 double noobs;&lt;/P&gt;
&lt;P&gt;var golfcourse par holes&amp;nbsp;&amp;nbsp; total_yardage fees ;&lt;/P&gt;
&lt;P&gt;label par ='Par' holes='No. of holes' total_yardage='Yardage' fees='Greens_Fees';&lt;/P&gt;
&lt;P&gt;format &amp;nbsp;&amp;nbsp;total_yardage comma5. fees comma10.2;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;I am getting error&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 31 Jan 2017 05:07:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step-error/m-p/328641#M73381</guid>
      <dc:creator>venkatnaveen</dc:creator>
      <dc:date>2017-01-31T05:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: data step error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step-error/m-p/328643#M73382</link>
      <description>Hi:&lt;BR /&gt;  This looks like homework for a class. Is it?&lt;BR /&gt;cynthia</description>
      <pubDate>Tue, 31 Jan 2017 05:10:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step-error/m-p/328643#M73382</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-01-31T05:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: data step error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step-error/m-p/328644#M73383</link>
      <description>&lt;P&gt;Yes the task given and I solkved that way.I am unable to get the o/p&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 05:11:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step-error/m-p/328644#M73383</guid>
      <dc:creator>venkatnaveen</dc:creator>
      <dc:date>2017-01-31T05:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: data step error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step-error/m-p/328645#M73384</link>
      <description>&lt;P&gt;Here is your first program.&lt;/P&gt;
&lt;P&gt;Statement should end with semicolon (&amp;nbsp;&lt;STRONG&gt;;&amp;nbsp;&lt;/STRONG&gt;) not by colon ( : );&lt;/P&gt;
&lt;P&gt;The INFORMAT statement is uncomplete; You can cancel it as you defined the informats within the INPUT statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname perm "C:\temp";
data perm.question02&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;:&lt;/STRONG&gt;&lt;/FONT&gt;   /* should be ; not : */
infile datalines dsd ;
&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;informat total_yardage fees;&lt;/STRONG&gt;&lt;/FONT&gt;
input  golfcourse $ holes par total_yardage &lt;STRONG&gt;comma5&lt;/STRONG&gt;. fees &lt;STRONG&gt;comma10.2&lt;/STRONG&gt;;
datalines;
Kapalua Plantation 18 73 7263 125.00
Pukalani                18 72 6945 55.00
Sandlewood          18 72 6469 35.00
Silversword            18 71    .    57.00
Waiehu Municipal  18 72 6330 25.00
Grand Waikapa      18 72 6122 200.0
;
run;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Your second program is below.&lt;/P&gt;
&lt;P&gt;You created dataset&amp;nbsp;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;CODE class=" language-sas"&gt;&lt;STRONG&gt;perm.question02&lt;/STRONG&gt;, that is in library&amp;nbsp;&lt;STRONG&gt;perm&lt;/STRONG&gt; but you are trying to read&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;the dataset from&amp;nbsp;&lt;STRONG&gt;work&lt;/STRONG&gt;, the temporary, default library:&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;titile "Question#2";
proc print data = &lt;STRONG&gt;question02&lt;/STRONG&gt; double noobs;
var golfcourse par holes   total_yardage fees ;
label par ='Par' holes='No. of holes' total_yardage='Yardage' fees='Greens_Fees';
format   total_yardage comma5. fees comma10.2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I see no other errors.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 05:44:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step-error/m-p/328645#M73384</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-01-31T05:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: data step error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step-error/m-p/328654#M73385</link>
      <description>&lt;P&gt;There are several additional issues to attend to. &amp;nbsp;Definitely refer to the right data sets. &amp;nbsp;But on top of that ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When reading the data, DSD is incorrect. &amp;nbsp;That informs SAS that commas should be used as delimiters, instead of spaces. &amp;nbsp;Just remove it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The INFORMAT statement is unnecessary. &amp;nbsp;Since no informats are actually specified, it does nothing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The COMMA informats within the INPUT statement are also unnecessary. &amp;nbsp;The data contains no commas and can mostly be read in simple fashion by scanning the lines of data from left to right. &amp;nbsp;(Later when printing, FORMATS are needed. &amp;nbsp;More on that later.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The GOLFCOURSE values will be incorrect. &amp;nbsp;SAS will truncate them to 8 characters. &amp;nbsp;Also, to read a single embedded blank as part of the name of the golf course, you will need 2 blanks between the GOLFCOURSE and the HOLES within the datalines. &amp;nbsp;Additional measures are still needed to read that data. &amp;nbsp;First, add a LENGTH statement before the INPUT statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;length golfcourse&amp;nbsp;$ 20;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then within the INPUT statement, instruct SAS to look for 2 blanks, not 1, to mark the end of GOLFCOURSE:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;input golfcourse&amp;nbsp;$ &amp;amp; par ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That should take care of the DATA step. &amp;nbsp;PROC PRINT still has an issue or two.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get labels to print as column&amp;nbsp;headings instead of variable names, you need to add an option to the PROC PRINT statement. &amp;nbsp;Either LABEL or the SPLIT= option would have that effect. &amp;nbsp;Since one of the labels needs to be split across two lines, SPLIT= would be better because it would give you control over splitting the label. &amp;nbsp;So if you add this to the PROC PRINT statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;split='*'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to match that you would use these labels:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;label holes='No. of*holes'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;fees='Greens*Fees';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, you're using the wrong format for FEES. &amp;nbsp;To get dollar signs to print, you need a DOLLAR format:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;format fees dollar7.2;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give it a shot, see how close you get.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 07:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step-error/m-p/328654#M73385</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-01-31T07:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: data step error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-step-error/m-p/328677#M73393</link>
      <description>&lt;P&gt;Thanks a lot.&lt;/P&gt;
&lt;P&gt;Superb..!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 09:57:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-step-error/m-p/328677#M73393</guid>
      <dc:creator>venkatnaveen</dc:creator>
      <dc:date>2017-01-31T09:57:52Z</dc:date>
    </item>
  </channel>
</rss>

