<?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: SAS code in SAS Software for Learning Community</title>
    <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837070#M707</link>
    <description>&lt;P&gt;I do not have any red errors in my code.&lt;/P&gt;&lt;P&gt;here is it...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;libname leah'/home/u62178216/my_content' ;&lt;BR /&gt;data leah.Week5 ;&lt;BR /&gt;infile '/home/u62178216/my_content/Week5.txt' ;&lt;BR /&gt;input sexvar$ 1 genhlth$ 2 physhlth$ 3-4 medcost$ 5 diabage3$ 6-7 smoke$ 8 &lt;BR /&gt;      indortan$ 9-11 race$ 12 ;&lt;BR /&gt;label physhlth = 'How respondent rated their physical health' ;&lt;BR /&gt;run ;&lt;/PRE&gt;&lt;P&gt;the only thing I am getting is this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Oct 2022 23:26:41 GMT</pubDate>
    <dc:creator>leahstinson</dc:creator>
    <dc:date>2022-10-05T23:26:41Z</dc:date>
    <item>
      <title>SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837052#M697</link>
      <description>&lt;P&gt;having problem finding the issues with my code, no results showing in results tab&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 21:53:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837052#M697</guid>
      <dc:creator>leahstinson</dc:creator>
      <dc:date>2022-10-05T21:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837055#M698</link>
      <description>&lt;P&gt;First, on this forum it is best to paste Code or Log entries as TEXT in a text box. Copy the text from your editor or log window; on the forum open a text box using the &amp;lt;/&amp;gt; icon above the message window and paste the text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For a number of reasons many will not open attachments from unknown sources, such as you.&lt;/P&gt;
&lt;P&gt;Second, you pasted a PICTURE of your code which makes it very hard to make changes to the code and I'm not going to retype a lot of text from a picture.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you read your LOG? Does your LOG show any errors? If not then it would show how many records were read into the data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your code reads an external file into a data set using data step. That does not write anything to the results window unless you have a FILE PRINT statement and one or more PUT statements in the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the data set was created successfully then you should be able to Proc Print the set to see the contents of the data set and that would be sent to the results window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 22:07:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837055#M698</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-05T22:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837056#M699</link>
      <description>&lt;P&gt;I can not copy and paste the text because it is a very log text and that w=is the reason my instructor told use to upload it into SAS. I also had to paste it to word because SAS would not allow me to upload images (pgn, ect..)&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 22:09:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837056#M699</guid>
      <dc:creator>leahstinson</dc:creator>
      <dc:date>2022-10-05T22:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837058#M700</link>
      <description>&lt;PRE&gt;libname leah'/home/u62178216/my_content' ;&lt;BR /&gt;data leah.Week5 ;&lt;BR /&gt;infile '/home/u62178216/my_content/Week5.txt' ;&lt;BR /&gt;input sexvar$ 1 genhlth$ 2 physhlth$ 3-4 medcost$ 5 diabage3 6-7 smoke$ 8 &lt;BR /&gt;      indortan$ 9-11 race$ 12 ;&lt;BR /&gt;label physhlth = 'How respondent rated their physical health' ;&lt;BR /&gt;run ;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that is my code so far. It is not showing any red errors, but it is showing messages.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 22:10:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837058#M700</guid>
      <dc:creator>leahstinson</dc:creator>
      <dc:date>2022-10-05T22:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837060#M701</link>
      <description>&lt;P&gt;Please post the log from this step. If a lot of similar messages appear, show just a few of them.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 22:17:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837060#M701</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-10-05T22:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837061#M702</link>
      <description />
      <pubDate>Wed, 05 Oct 2022 22:20:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837061#M702</guid>
      <dc:creator>leahstinson</dc:creator>
      <dc:date>2022-10-05T22:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837065#M703</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/435655"&gt;@leahstinson&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I can not copy and paste the text because it is a very log text and that w=is the reason my instructor told use to upload it into SAS. I also had to paste it to word because SAS would not allow me to upload images (pgn, ect..)&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;At the top of the message window is a row of icons. The 12th one from the left is a camera. If click on that a window appears that allows uploading windows by dragging them from another window, such as Windows explorer, and dropping them or click on the "choose files" and that should bring up your file manager so you can navigate to where the image file is kept on your computer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only way that your code could have generated a "long" text would be from invalid data messages, which would be about 100 lines or so and NOT that long. The details of those messages would tell use problems, such as reading incorrect variable types or informats.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The LOG is where the details of problems are, not the code. So sharing the log would have helped. It is still better to use TEXT because we can then copy and paste portions of the text, either to modify code or to provide how to interpret the information SAS is giving you.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 22:36:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837065#M703</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-05T22:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837066#M704</link>
      <description>&lt;P&gt;LOST CARD almost always means you have attempted to read past the end of the actual data.&lt;/P&gt;
&lt;P&gt;Since you are reading fixed columns and attempting to read the variable Race from column 12 any line of that external file that does not have 12 characters in the line encounters a problem.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 22:42:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837066#M704</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-05T22:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837067#M705</link>
      <description>&lt;P&gt;This is my first SAS class and my instructor does not explain these issues, usually just gives us the data and we have to figure out the code and how to fix it. What is the best approach to fix this issue?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 22:44:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837067#M705</guid>
      <dc:creator>leahstinson</dc:creator>
      <dc:date>2022-10-05T22:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837069#M706</link>
      <description>&lt;P&gt;Not sure what a "red error" is.&amp;nbsp; Are you perhaps talking about the color coding that some editors might do based on how the are guessing SAS will interpret the code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are missing a space in your libname statement between the libref (the name of the library you are defining) and the directory.&amp;nbsp; Does that generate an error in the LOG?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You also have the $ input modifier smashed up against the variable names as if it was part of the variable name.&amp;nbsp; That just looks confusing, but SAS can probably figure it out since the $ character cannot be part of a variable name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If some of the lines do not have all 12 characters on them then you should add the TRUNCOVER option to the INFILE statement.&amp;nbsp; Note there are only very extremely rare situations where you would use the ancient MISSOVER option instead of the modern (only 30 years old) TRUNCOVER option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Coding hint.&amp;nbsp; Indent the body of the DATA step. When you have multiple line statement, like your INPUT place the ending semi-colon on a new line, it will be easier to see where the statement ends without having to move your focus from the beginning of the lines.&amp;nbsp; Moving your focus (and/or your eyes or your head) back and forth can cause you to lose your place.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname leah '/home/u62178216/my_content' ;
data leah.Week5 ;
  infile '/home/u62178216/my_content/Week5.txt'  truncover;
  input sexvar $ 1 genhlth $ 2 physhlth $ 3-4 medcost $ 5 diabage3 6-7 smoke $ 8 
      indortan $ 9-11 race $ 12 
  ;
  label physhlth = 'How respondent rated their physical health' ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 23:21:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837069#M706</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-05T23:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837070#M707</link>
      <description>&lt;P&gt;I do not have any red errors in my code.&lt;/P&gt;&lt;P&gt;here is it...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;libname leah'/home/u62178216/my_content' ;&lt;BR /&gt;data leah.Week5 ;&lt;BR /&gt;infile '/home/u62178216/my_content/Week5.txt' ;&lt;BR /&gt;input sexvar$ 1 genhlth$ 2 physhlth$ 3-4 medcost$ 5 diabage3$ 6-7 smoke$ 8 &lt;BR /&gt;      indortan$ 9-11 race$ 12 ;&lt;BR /&gt;label physhlth = 'How respondent rated their physical health' ;&lt;BR /&gt;run ;&lt;/PRE&gt;&lt;P&gt;the only thing I am getting is this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 23:26:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837070#M707</guid>
      <dc:creator>leahstinson</dc:creator>
      <dc:date>2022-10-05T23:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837073#M708</link>
      <description>&lt;P&gt;Why do you keep attaching DOCX files?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 00:35:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837073#M708</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-06T00:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837075#M709</link>
      <description>&lt;P&gt;So that you can see the screenshot of my SAS results. This is the notes that I am getting from my code.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Log 1.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75935iFA0BCF47EBDD1740/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Log 1.PNG" alt="Log 1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;pictures&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 00:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837075#M709</guid>
      <dc:creator>leahstinson</dc:creator>
      <dc:date>2022-10-06T00:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837076#M710</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/435655"&gt;@leahstinson&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;So that you can see the screenshot of my SAS results. This is the notes that I am getting from my code.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Log 1.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75935iFA0BCF47EBDD1740/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Log 1.PNG" alt="Log 1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;pictures&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Why do you include a photograph of text?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The most important part of the log you cropped out of the photo.&lt;/P&gt;
&lt;P&gt;How many lines were read from the text file.&lt;/P&gt;
&lt;P&gt;How long was the shortest line?&lt;/P&gt;
&lt;P&gt;How long was the widest line?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there anything WRONG with the dataset that it generated?&amp;nbsp; Perhaps the LOST CARD was after the end of the actual data so that it does not matter.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 00:35:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837076#M710</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-06T00:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837080#M711</link>
      <description>&lt;P&gt;How do you want me to show you the log? I am sorry. It is hard explaining and showing this way if you can not fully see the whole thing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 00:49:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837080#M711</guid>
      <dc:creator>leahstinson</dc:creator>
      <dc:date>2022-10-06T00:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837083#M712</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75937i3A1497CA5DC5E21E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1.PNG" alt="1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75938i0BB30FB4AB4ABB59/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2.PNG" alt="2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;This is the complete log.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 00:52:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837083#M712</guid>
      <dc:creator>leahstinson</dc:creator>
      <dc:date>2022-10-06T00:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837084#M713</link>
      <description>&lt;P&gt;I am just trying to figure out why I get output data but no results.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 00:54:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837084#M713</guid>
      <dc:creator>leahstinson</dc:creator>
      <dc:date>2022-10-06T00:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837091#M714</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/435655"&gt;@leahstinson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use below highlighted icon and then copy/paste your log as text.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1665020514285.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75939i1065D6A83AF63A6D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_0-1665020514285.png" alt="Patrick_0-1665020514285.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;...or attach the ....log file via&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_1-1665020563347.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75940i826D0AF060A836CA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Patrick_1-1665020563347.png" alt="Patrick_1-1665020563347.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking at your code the first issue you're having is:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_2-1665020612473.png" style="width: 116px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75941i4CD476C9567AE03A/image-dimensions/116x16?v=v2" width="116" height="16" role="button" title="Patrick_2-1665020612473.png" alt="Patrick_2-1665020612473.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_3-1665020646567.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75942iACBBFBCA3A0B5225/image-dimensions/400x11?v=v2" width="400" height="11" role="button" title="Patrick_3-1665020646567.png" alt="Patrick_3-1665020646567.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to add TRUNCOVER or MISSOVER to your infile statement.&lt;/P&gt;
&lt;P&gt;You likely should also define what character delimits your source data. If it's a comma then add to the infile statment: dlm=','&lt;/P&gt;
&lt;P&gt;And you should also ensure that SAS treats consecutive delimiters as two delimiters. DSD is doing this for you.&lt;/P&gt;
&lt;PRE&gt;infile '/home/u62178216/my_content/Week5.txt'  dsd dlm=',' truncover;&lt;/PRE&gt;
&lt;P&gt;If you have problems with the syntax of infile/input statements then using SAS EG (and something similar with SAS Studio): &lt;STRONG&gt;Use the import wizard&lt;/STRONG&gt; as it will generate the code for you. And if you're not happy then you can take the code and just amend it to your needs. In EG it's under menu: File/Import Data.&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>Thu, 06 Oct 2022 01:57:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837091#M714</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2022-10-06T01:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837094#M715</link>
      <description>&lt;P&gt;So your program does not match the data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The log is showing that all of the lines have exactly 9 characters.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1665029557155.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75944i0F6FCEC6EA4FFF24/image-size/large?v=v2&amp;amp;px=999" role="button" title="Tom_0-1665029557155.png" alt="Tom_0-1665029557155.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Your input statement is trying to read 12 characters per line.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input sexvar$ 1 genhlth$ 2 physhlth$ 3-4 medcost$ 5 diabage3$ 6-7 smoke$ 8 
      indortan$ 9-11 race$ 12 
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Why not &lt;STRONG&gt;LOOK&lt;/STRONG&gt; at the data and &lt;STRONG&gt;SEE&lt;/STRONG&gt; what it looks like?&lt;/P&gt;
&lt;P&gt;Here is a simple data step that will read the first few lines and dump them to the log.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile '/home/u62178216/my_content/Week5.txt'  obs=10;
  input;
  list;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If the issue is just that RACE is missing on every line and INDORTAN is only one character on every line then the previously suggested solution of add the TRUNCOVER option to the INFILE statement will fix the program.&amp;nbsp; But if the data shows something else then you will probably need to change the INPUT statement instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To copy a SAS log use the mouse or the cursor keys to highlight the lines of text you want and the use the COPY function of your computer.&amp;nbsp; Usually Ctrl-C on most computers.&amp;nbsp; You can then click on the Insert Code button in the forum to open a pop-up window where you can paste in the lines of text you now have in the paste buffer.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1665021299030.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75943i68D0F5575E453C22/image-size/large?v=v2&amp;amp;px=999" role="button" title="Tom_0-1665021299030.png" alt="Tom_0-1665021299030.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 04:17:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837094#M715</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-06T04:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837105#M716</link>
      <description>&lt;P&gt;Open the text file with a text editor like Notepad (the freely available Notepad++ is better for this). Copy the first few lines and paste them into a window opened with this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 03:56:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/SAS-code/m-p/837105#M716</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-10-06T03:56:40Z</dc:date>
    </item>
  </channel>
</rss>

