<?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 Input Files in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777236#M31445</link>
    <description>&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://media.discordapp.net/attachments/837554241743749151/903597306153164810/unknown.png?width=323&amp;amp;height=300" border="0" alt="" /&gt;&lt;/P&gt;&lt;P&gt;txt file name:ABC&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://media.discordapp.net/attachments/837554241743749151/903597459119431731/unknown.png?width=400&amp;amp;height=219" border="0" alt="" /&gt;&lt;/P&gt;&lt;P&gt;LineA 1022 John Chan&lt;BR /&gt;LineB 2/1/2021 23,000 42&lt;BR /&gt;LineA 3012 Susan Kwan&lt;BR /&gt;LineB 16/1/2021 12,000 38&lt;BR /&gt;LineA 1120 Tom Wong&lt;BR /&gt;LineB 13/01/2021 9,000 .&lt;BR /&gt;LineA 2401 Judy Wang&lt;BR /&gt;LineB 12/01/2021 135,000.5 59&lt;BR /&gt;LineA 2401 George Cheung&lt;BR /&gt;LineB 12/01/2021 . 61&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know how to import/infile correctly&lt;/P&gt;&lt;P&gt;Name can't read all&lt;/P&gt;&lt;P&gt;AppDate can't be changed into date form&lt;/P&gt;&lt;P&gt;income will be missing&lt;/P&gt;&lt;P&gt;Age also can't be read&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Oct 2021 11:36:40 GMT</pubDate>
    <dc:creator>Season_TT</dc:creator>
    <dc:date>2021-10-29T11:36:40Z</dc:date>
    <item>
      <title>Input Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777236#M31445</link>
      <description>&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://media.discordapp.net/attachments/837554241743749151/903597306153164810/unknown.png?width=323&amp;amp;height=300" border="0" alt="" /&gt;&lt;/P&gt;&lt;P&gt;txt file name:ABC&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://media.discordapp.net/attachments/837554241743749151/903597459119431731/unknown.png?width=400&amp;amp;height=219" border="0" alt="" /&gt;&lt;/P&gt;&lt;P&gt;LineA 1022 John Chan&lt;BR /&gt;LineB 2/1/2021 23,000 42&lt;BR /&gt;LineA 3012 Susan Kwan&lt;BR /&gt;LineB 16/1/2021 12,000 38&lt;BR /&gt;LineA 1120 Tom Wong&lt;BR /&gt;LineB 13/01/2021 9,000 .&lt;BR /&gt;LineA 2401 Judy Wang&lt;BR /&gt;LineB 12/01/2021 135,000.5 59&lt;BR /&gt;LineA 2401 George Cheung&lt;BR /&gt;LineB 12/01/2021 . 61&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know how to import/infile correctly&lt;/P&gt;&lt;P&gt;Name can't read all&lt;/P&gt;&lt;P&gt;AppDate can't be changed into date form&lt;/P&gt;&lt;P&gt;income will be missing&lt;/P&gt;&lt;P&gt;Age also can't be read&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 11:36:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777236#M31445</guid>
      <dc:creator>Season_TT</dc:creator>
      <dc:date>2021-10-29T11:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Input Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777239#M31446</link>
      <description>&lt;P&gt;What is the desired result?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are there ALWAYS two rows for each person; there is never one row for a person and there are never three (or more) rows for a person?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 11:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777239#M31446</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-29T11:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Input Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777240#M31447</link>
      <description>&lt;P&gt;it is two rows for each person.&lt;BR /&gt;I only need to read this txt correctly just mean finish task1.&lt;/P&gt;&lt;P&gt;I have read this code:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Season_TT_0-1635507250166.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65201i1A5DF8C53785751E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Season_TT_0-1635507250166.png" alt="Season_TT_0-1635507250166.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and output&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Season_TT_1-1635507269176.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65202iA76B5D819EBF0D6A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Season_TT_1-1635507269176.png" alt="Season_TT_1-1635507269176.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but it is not correct because it should be Name rather than FName and SName.&lt;/P&gt;&lt;P&gt;Also, Income and Age can't read success.&lt;/P&gt;&lt;P&gt;(Actually, AppDate should be date in form of DD/MM/YYYY.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think i can finish other after read txt correctly.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 11:35:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777240#M31447</guid>
      <dc:creator>Season_TT</dc:creator>
      <dc:date>2021-10-29T11:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Input Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777241#M31448</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input string $200.;
infile cards truncover;
cards;
LineA 1022 John Chan
LineB 2/1/2021 23,000 42
LineA 3012 Susan Kwan
LineB 16/1/2021 12,000 38
LineA 1120 Tom Wong
LineB 13/01/2021 9,000 .
LineA 2401 Judy Wang
LineB 12/01/2021 135,000.5 59
LineA 2401 George Cheung
LineB 12/01/2021 . 61
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Oct 2021 11:32:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777241#M31448</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-29T11:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Input Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777244#M31449</link>
      <description>&lt;P&gt;no, I don't need to use datafile. I need to read into SAS data set.&lt;/P&gt;&lt;P&gt;Also, LineA and LineB is not necessary.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the output is this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Season_TT_0-1635507905816.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65204iE6ED3A5563CEF4CA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Season_TT_0-1635507905816.png" alt="Season_TT_0-1635507905816.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But my result now:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Season_TT_0-1635508825144.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65205i74C952FE58FBF599/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Season_TT_0-1635508825144.png" alt="Season_TT_0-1635508825144.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 12:00:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777244#M31449</guid>
      <dc:creator>Season_TT</dc:creator>
      <dc:date>2021-10-29T12:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Input Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777250#M31451</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;&lt;BR /&gt;input @7 cno name $char30. / @7 appdate ddmmyy10. income :comma12. age;&lt;BR /&gt;format appdate ddmmyys8.;&lt;BR /&gt;cards;&lt;BR /&gt;&lt;SPAN&gt;LineA 1022 John Chan&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LineB 2/1/2021 23,000 42&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LineA 3012 Susan Kwan&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LineB 16/1/2021 12,000 38&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LineA 1120 Tom Wong&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LineB 13/01/2021 9,000 .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LineA 2401 Judy Wang&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LineB 12/01/2021 135,000.5 59&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LineA 2401 George Cheung&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LineB 12/01/2021 . 61&lt;/SPAN&gt;&lt;BR /&gt;;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Oct 2021 12:00:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777250#M31451</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-29T12:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Input Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777254#M31452</link>
      <description>&lt;P&gt;Based on your code:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Season_TT_1-1635509246178.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65207iA87EFAEA94826D49/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Season_TT_1-1635509246178.png" alt="Season_TT_1-1635509246178.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Season_TT_2-1635509262015.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65208i747F798B78C39C48/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Season_TT_2-1635509262015.png" alt="Season_TT_2-1635509262015.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problems:&lt;BR /&gt;1. Name is missing&lt;/P&gt;&lt;P&gt;2. first row Income is wrong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 12:08:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777254#M31452</guid>
      <dc:creator>Season_TT</dc:creator>
      <dc:date>2021-10-29T12:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Input Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777255#M31453</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/404811"&gt;@Season_TT&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the inputs you provided, it works for me properly. So something in the inputs you provided does not match the actual file loan_app.txt.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 12:11:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777255#M31453</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-29T12:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Input Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777258#M31454</link>
      <description>&lt;P&gt;I just copy and paste the txt file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i have correct something&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Season_TT_0-1635509735808.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65209iA0BB38495556799C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Season_TT_0-1635509735808.png" alt="Season_TT_0-1635509735808.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OUTPUT:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Season_TT_1-1635509754813.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65210iCB7B7A96A19A9A1C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Season_TT_1-1635509754813.png" alt="Season_TT_1-1635509754813.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only the first Income is wrong which should be 23,000&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 12:16:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777258#M31454</guid>
      <dc:creator>Season_TT</dc:creator>
      <dc:date>2021-10-29T12:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Input Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777259#M31455</link>
      <description>&lt;P&gt;You could try this one :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;
infile cards dlm=' ';
input dummy1 : $20. cno name &amp;amp; $30. / 
      dummy2 : $20. appdate : ddmmyy10. income :comma12. age;
format appdate ddmmyys8.;
cards;
LineA 1022 John Chan
LineB 2/1/2021 23,000 42
LineA 3012 Susan Kwan
LineB 16/1/2021 12,000 38
LineA 1120 Tom Wong
LineB 13/01/2021 9,000 .
LineA 2401 Judy Wang
LineB 12/01/2021 135,000.5 59
LineA 2401 George Cheung
LineB 12/01/2021 . 61
;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Oct 2021 12:20:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777259#M31455</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-10-29T12:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Input Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777260#M31456</link>
      <description>&lt;P&gt;Add a colon to the INPUT statement before ddmmyy10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input @7 cno name $char30. / @7 appdate :ddmmyy10. income :comma12. age;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Oct 2021 12:20:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777260#M31456</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-29T12:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Input Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777266#M31457</link>
      <description>it's okay.&lt;BR /&gt;I have submitted.&lt;BR /&gt;Thanks for helping.&lt;BR /&gt;At least I can finish it because of your way.&lt;BR /&gt;Thank you so much.</description>
      <pubDate>Fri, 29 Oct 2021 12:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777266#M31457</guid>
      <dc:creator>Season_TT</dc:creator>
      <dc:date>2021-10-29T12:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Input Files</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777279#M31458</link>
      <description>&lt;P&gt;One way to deal with lines that have different fields based on their "type" is to use trailing&amp;nbsp;@ on the INPUT so you can execute different INPUT statements to read the rest of the line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First let's create a file with your test data.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options parmcards=example;
filename example temp;
parmcrds;
LineA 1022 John Chan
LineB 2/1/2021 23,000 42
LineA 3012 Susan Kwan
LineB 16/1/2021 12,000 38
LineA 1120 Tom Wong
LineB 13/01/2021 9,000 .
LineA 2401 Judy Wang
LineB 12/01/2021 135,000.5 59
LineA 2401 George Cheung
LineB 12/01/2021 . 61
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now let's use an INFILE statement with the FILEREF we just created that points to that text.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
  infile example truncover ;
  input type $ @ ;
  if type='LineA' then input cno $ name $30. ;
  else if type='LineB' then do;
     input appdate :ddmmyy. income :comma. age ;
     output;
     call missing(of _all_);
  end;
  retain cno name;
  format appdate yymmdd10.;
  drop type;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Results:&lt;/P&gt;
&lt;PRE&gt;Obs    cno     name                appdate     income     age

 1     1022    John Chan        2021-01-02     23000.0     42
 2     3012    Susan Kwan       2021-01-16     12000.0     38
 3     1120    Tom Wong         2021-01-13      9000.0      .
 4     2401    Judy Wang        2021-01-12    135000.5     59
 5     2401    George Cheung    2021-01-12          .      61
&lt;/PRE&gt;
&lt;P&gt;So what is the code doing?&lt;/P&gt;
&lt;P&gt;DATA statement names the dataset the step is going to create, WANT in this case.&lt;/P&gt;
&lt;P&gt;INFILE statement points to the file to read. I am using a fileref here, but you could also just use the actual name of the file in quotes instead.&amp;nbsp; The TRUNCOVER option says to not go to the next line to hunt for data if there are not enough values to satisfy the INPUT statement.&amp;nbsp; Note the MISSOVER option is almost never wanted as the only different between it and TRUNCOVER is that MISSOVER will ignore text at the end of the line if it happens to be shorter than the width of the formatted input request.&amp;nbsp; TRUNCOVER will instead use that "truncated" text.&lt;/P&gt;
&lt;P&gt;The first INPUT statement is reading that first column of text in your file so it can use that to tell what type of line it is.&lt;/P&gt;
&lt;P&gt;Then the IF/THEN/ELSE is deciding which code to run based on the TYPE read.&lt;/P&gt;
&lt;P&gt;When the type is LineA it reads the CNO (note this looks like an identifier and not an actual number so read it as character) and NAME.&amp;nbsp; For the CNO I just used the bare $ modifier on the INPUT statement to let SAS know I want it to be character.&amp;nbsp; SAS will default the length to 8 bytes.&amp;nbsp; For the name I use formatted input so I can read the whole name into one field.&amp;nbsp; In real life names do not come in neat first/last single word pairs. By using formatted input it will read the space into the NAME instead of treating it as a delimiter.&lt;/P&gt;
&lt;P&gt;For LineB we want to do more than one statement so we use a DO/END block.&amp;nbsp; For two of the numbers on the line we need to use a special informat to read them.&amp;nbsp; But we want the INPUT to still use the space as a delimiter so we prefix the informat with the&amp;nbsp; : modifier.&amp;nbsp; Note that we don't need to specify the width of the informat here as it will be ignored anyway.&amp;nbsp; The AGE does not need any special informat to be read.&amp;nbsp; The OUTPUT statement will write the observation the dataset at this point.&amp;nbsp; The CALL MISSING will clear out the values retain from the the LineA records, just in case there are any ids' that only have LineB without LineA.&lt;/P&gt;
&lt;P&gt;The RETAIN statement says to remember the values read on the LineA line so they are still there when we read the LineB line.&lt;/P&gt;
&lt;P&gt;The FORMAT statement says to attach a special format to the appdate variable so humans will recognize the values are dates.&amp;nbsp; Note that I used YMD order on the dates. It you use DMY or MDY order then either way half of your audience will be confused.&amp;nbsp; The other variables do not need formats attached to them, SAS already knows how to display numbers and strings.&amp;nbsp; But you might want to attach a format to INCOME so it will always show two decimal places.&amp;nbsp; Use the COMMA or DOLLAR format if you want the thousands separator to print. Make sure to include those punctuation characters when calculating what width to use on the format.&lt;/P&gt;
&lt;P&gt;The DROP statement says we don't want to have the TYPE variable on the output dataset.&lt;/P&gt;
&lt;P&gt;The RUN statement let's SAS know the step is done being described and it can start trying to interpret the code and run it.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 13:31:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Input-Files/m-p/777279#M31458</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-10-29T13:31:59Z</dc:date>
    </item>
  </channel>
</rss>

