<?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 Issues inputting RECID data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Issues-inputting-RECID-data/m-p/780870#M248858</link>
    <description>&lt;P&gt;I'm having trouble inputting recid data into SAS. Here is my first 10 lines of code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data recid;
   input id$ week arrest$ fin$ age race$ wexp$ mar$ paro$ prio educ$;
   cards;
1       20      1       0       27      1       0       0       1	3	3
2       17	1	0	18	1	0	0	1	8	4
3	25	1	0	19	0	1	0	1	13	3
4	53	0	1	23	1	1	1	1	1	5
5	53	0	0	19	0	1	0	1	3	3
6	53	0	0	24	1	1	0	0	2	4
7	23	1	0	25	1	1	1	1	0	4
8	53	0	1	21	1	1	0	1	4	3
9	53	0	0	22	1	0	0	0	6	3
10	53	0	0	20	1	1	0	0	0	5
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The output, however, ends up looking like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; id&amp;nbsp; &amp;nbsp; week&amp;nbsp; &amp;nbsp; arrest&amp;nbsp; &amp;nbsp; fin&amp;nbsp; &amp;nbsp; age&amp;nbsp; &amp;nbsp; race&amp;nbsp; &amp;nbsp; wexp&amp;nbsp; &amp;nbsp; mar&amp;nbsp; &amp;nbsp; paro&amp;nbsp; &amp;nbsp; prio&amp;nbsp; &amp;nbsp; educ&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; 20&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; 27&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 3 3&amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp;17 1 01&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's going on here?&lt;/P&gt;</description>
    <pubDate>Wed, 17 Nov 2021 20:32:59 GMT</pubDate>
    <dc:creator>westbestern</dc:creator>
    <dc:date>2021-11-17T20:32:59Z</dc:date>
    <item>
      <title>Issues inputting RECID data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issues-inputting-RECID-data/m-p/780870#M248858</link>
      <description>&lt;P&gt;I'm having trouble inputting recid data into SAS. Here is my first 10 lines of code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data recid;
   input id$ week arrest$ fin$ age race$ wexp$ mar$ paro$ prio educ$;
   cards;
1       20      1       0       27      1       0       0       1	3	3
2       17	1	0	18	1	0	0	1	8	4
3	25	1	0	19	0	1	0	1	13	3
4	53	0	1	23	1	1	1	1	1	5
5	53	0	0	19	0	1	0	1	3	3
6	53	0	0	24	1	1	0	0	2	4
7	23	1	0	25	1	1	1	1	0	4
8	53	0	1	21	1	1	0	1	4	3
9	53	0	0	22	1	0	0	0	6	3
10	53	0	0	20	1	1	0	0	0	5
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The output, however, ends up looking like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; id&amp;nbsp; &amp;nbsp; week&amp;nbsp; &amp;nbsp; arrest&amp;nbsp; &amp;nbsp; fin&amp;nbsp; &amp;nbsp; age&amp;nbsp; &amp;nbsp; race&amp;nbsp; &amp;nbsp; wexp&amp;nbsp; &amp;nbsp; mar&amp;nbsp; &amp;nbsp; paro&amp;nbsp; &amp;nbsp; prio&amp;nbsp; &amp;nbsp; educ&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; 20&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; 27&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 3 3&amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp;17 1 01&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's going on here?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 20:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issues-inputting-RECID-data/m-p/780870#M248858</guid>
      <dc:creator>westbestern</dc:creator>
      <dc:date>2021-11-17T20:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Issues inputting RECID data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issues-inputting-RECID-data/m-p/780873#M248859</link>
      <description>Looks like you have a tab as a delimiter instead of spaces? Or fixed width possibly?&lt;BR /&gt;&lt;BR /&gt;Try adding this lines and seeing if it helps:&lt;BR /&gt;&lt;BR /&gt;infile cards dlm='09'x DSD TRUNCOVER;&lt;BR /&gt;&lt;BR /&gt;This will tell SAS the delimiter is a tab. FYI - you're reading in numeric data as a character in some places (educ, paro) is that what you want to do?</description>
      <pubDate>Wed, 17 Nov 2021 20:50:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issues-inputting-RECID-data/m-p/780873#M248859</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-17T20:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Issues inputting RECID data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issues-inputting-RECID-data/m-p/780874#M248860</link>
      <description>the infile statement worked perfectly!! thank you! and yes, educ and paro are both categorical variables.</description>
      <pubDate>Wed, 17 Nov 2021 20:54:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issues-inputting-RECID-data/m-p/780874#M248860</guid>
      <dc:creator>westbestern</dc:creator>
      <dc:date>2021-11-17T20:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Issues inputting RECID data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issues-inputting-RECID-data/m-p/780876#M248862</link>
      <description>&lt;P&gt;Categorical doesn't mean they need to be character.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In fact, if you want them to sort and have them as a character, it'll sort alphabetically, ie 1, 10, 11, 12 while numbers will sort correctly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use formats to apply any descriptive labels and the CLASS statement will take both numeric/character variables when you need to specify variables as categorical.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 21:03:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issues-inputting-RECID-data/m-p/780876#M248862</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-17T21:03:47Z</dc:date>
    </item>
  </channel>
</rss>

