<?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: request for a solution in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316047#M69007</link>
    <description>&lt;P&gt;Sorry it didn't work! I just double checked and the last infile I had issues with apparently I used all three options.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile Main LRECL=800 MISSOVER TRUNCOVER ; &lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 01 Dec 2016 18:56:19 GMT</pubDate>
    <dc:creator>TheShark</dc:creator>
    <dc:date>2016-12-01T18:56:19Z</dc:date>
    <item>
      <title>request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316032#M68996</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a following text(magnolia) file on my free sas university edition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;M. grandiflora &amp;nbsp; &amp;nbsp; &amp;nbsp;Southern Magnolia &amp;nbsp; &amp;nbsp;80 &amp;nbsp;15 &amp;nbsp;E &amp;nbsp;White&lt;BR /&gt;M. Campbellii &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;80 &amp;nbsp;20 &amp;nbsp;D &amp;nbsp;Rose&lt;BR /&gt;M. Liliflora &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Lily Magnolia &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12 &amp;nbsp; &amp;nbsp;4 &amp;nbsp; D &amp;nbsp;Purple&lt;BR /&gt;M. soulangiana &amp;nbsp; Saucer Magnolia &amp;nbsp; &amp;nbsp; &amp;nbsp; 25 &amp;nbsp; &amp;nbsp;3 &amp;nbsp; D &amp;nbsp;Pink&lt;BR /&gt;M. Stellata Star &amp;nbsp; Magnolia &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10 &amp;nbsp; &amp;nbsp;3 &amp;nbsp; D &amp;nbsp;White&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the following code to read that into sas but &amp;nbsp;would not work.The problem is that four rows under M. Campbelli (80,20,D Rose) would be missing in the output.I tried using whatever &amp;nbsp;options i could recall but failed.The result looked like this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Obs&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;name&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;sciname&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;sale_qty&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;remnant&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;code&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;color&lt;/ST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&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;25&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;D&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Pink&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;M. Stellata&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&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; Star Magnolia&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;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;10&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;D&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;White&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;data flowers;&lt;BR /&gt;infile'/folders/myfolders/magnolia.txt' missover;&lt;BR /&gt;input name $ 1-14 sci_name $ 15-35 sale_qty 36-38 &amp;nbsp;remnant 39-40 code$ 41-42 color $;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=flowers;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 18:26:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316032#M68996</guid>
      <dc:creator>inquistive</dc:creator>
      <dc:date>2016-12-01T18:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316035#M68998</link>
      <description>&lt;P&gt;I would try the&amp;nbsp;&lt;SPAN&gt;truncover option either in place or with the missover option. You may need an lrecl option also if that doesn't work.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 18:37:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316035#M68998</guid>
      <dc:creator>TheShark</dc:creator>
      <dc:date>2016-12-01T18:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316039#M69000</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Looks like you have overlapping ranges.
Also note that 'list;' statement can help with ranges


data tst;
*input name $ 1-14 sci_name $ 15-35 sale_qty 36-38  remnant 39-40 code$ 41-42 color $;
input name $ 1-14 sci_name $ 15-40 sale_qty 41-45  remnant 46-50 code$ 51-53 color $;
list;
cards4;
M. grandiflora      Southern Magnolia    80   15   E  White
M. Campbellii                            80   20   D  Rose
M. Liliflora        Lily Magnolia        12    4   D  Purple
M. soulangiana      Saucer Magnolia      25    3   D  Pink
M. Stellata Star    Magnolia             10    3   D  White
;;;;
run;quit;&lt;BR /&gt;&lt;BR /&gt;
----+----1----+----2----+----3----+----4----+----5----+----6---
M. grandiflora      Southern Magnolia    80   15   E  White
M. Campbellii                            80   20   D  Rose
M. Liliflora        Lily Magnolia        12    4   D  Purple
M. soulangiana      Saucer Magnolia      25    3   D  Pink
M. Stellata Star    Magnolia             10    3   D  White



&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Dec 2016 18:43:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316039#M69000</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2016-12-01T18:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316040#M69001</link>
      <description>&lt;P&gt;Hi, truncover option yielded the same result as missover.&lt;/P&gt;&lt;P&gt;thank you though.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 18:45:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316040#M69001</guid>
      <dc:creator>inquistive</dc:creator>
      <dc:date>2016-12-01T18:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316042#M69003</link>
      <description>Note if you use the more powerful old text editor you can type 'cols' in the prefix area to get a ruler or use fslist with nums on and hex on. You can even use ths command file to find position of tabs or any other non-printable characters, ie f '09'x. I find these and the many other old text editor type functions that are not available in any of the newer somewhat crippled editors.</description>
      <pubDate>Thu, 01 Dec 2016 18:50:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316042#M69003</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2016-12-01T18:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316043#M69004</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;It worked when I did as per your &amp;nbsp;suggestion &amp;nbsp;using &amp;nbsp;the cards/datalines option.But how do I get the same result using the infile option?&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 18:53:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316043#M69004</guid>
      <dc:creator>inquistive</dc:creator>
      <dc:date>2016-12-01T18:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316045#M69005</link>
      <description>&lt;P&gt;Can you attach the txt file? Hard to say otherwise.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 18:55:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316045#M69005</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-12-01T18:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316046#M69006</link>
      <description>&lt;P&gt;Did you mean:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &lt;STRONG&gt;input&amp;nbsp;&lt;/STRONG&gt;@1 &amp;nbsp; &amp;nbsp;name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$14. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;@15&amp;nbsp;&lt;SPAN&gt;sci_name &amp;nbsp; &amp;nbsp; $20.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@36 sale_qty &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@39 remnant &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@41color &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ;&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 18:55:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316046#M69006</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-12-01T18:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316047#M69007</link>
      <description>&lt;P&gt;Sorry it didn't work! I just double checked and the last infile I had issues with apparently I used all three options.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile Main LRECL=800 MISSOVER TRUNCOVER ; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Dec 2016 18:56:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316047#M69007</guid>
      <dc:creator>TheShark</dc:creator>
      <dc:date>2016-12-01T18:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316050#M69009</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find attached the text file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 19:02:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316050#M69009</guid>
      <dc:creator>inquistive</dc:creator>
      <dc:date>2016-12-01T19:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316052#M69010</link>
      <description>&lt;P&gt;Did not work that way too.Thank you though.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 19:09:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316052#M69010</guid>
      <dc:creator>inquistive</dc:creator>
      <dc:date>2016-12-01T19:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316064#M69016</link>
      <description>&lt;P&gt;I poked around in the text file that was attached earlier in the thread and noticed a mixture of spaces and tabs which required some cleaning up. There are a hundred ways you could choose to clean it but I used a regular expression in notepad++ to throw pipes in there and then used the following code. The pipe delimited file is attached as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data flowers;
infile 'magnolia.txt' dsd dlm="|" missover truncover lrecl=999;
input
name  :$16.0
sci_name :$20.0
sale_qty :3.0
remnant :3.0
code :$2.0
color :$15.0;
run;
proc print data=flowers;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if that's what you were after, or if you were looking for SAS code to work around the dirty file (I'm not sure if that's possible).&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 19:46:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316064#M69016</guid>
      <dc:creator>TheShark</dc:creator>
      <dc:date>2016-12-01T19:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316070#M69017</link>
      <description>&lt;P&gt;Your code with slight cahange works fine:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data flowers;&lt;BR /&gt;infile'/folders/myfolders/magnolia.txt' &amp;nbsp;&lt;STRONG&gt;dlm='|' truncover;&lt;/STRONG&gt;&lt;BR /&gt;input name $ 1-14 sci_name $ 15-35 sale_qty 36-38 &amp;nbsp;remnant 39-40 code$ 41-42 color $;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=flowers;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 20:06:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/316070#M69017</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-12-01T20:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/335402#M75902</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/83652"&gt;@inquistive&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your data file isn't well formed -- it doesn't have predictable spacing between data values nor a reliable delimiter. &amp;nbsp;Here's what it looks like with all of the characters visible. &amp;nbsp;Notice line 2 has 4 tabs instead of a "sci_name" value, and the "sale_qty" value for that line falls at column 29 instead of 36 (per your program code).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7419iCD3985E518C42E8B/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="inq.png" title="inq.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/42345"&gt;@rogerjdeangelis&lt;/a&gt;&amp;nbsp;actually had a good suggestion to use the&amp;nbsp;&lt;STRONG&gt;LIST&lt;/STRONG&gt; statement to see the column positions. &amp;nbsp;When you do that, it's easy to see that line 2 is not placed the way you expect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;32         data flowers;
33         infile 'c:\temp\magnolia.txt' missover;
34         input line $ 256;
35         list;
36         run;

RULE:     ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0                      

1   CHAR  M. grandiflora .Southern Magnolia .80 15 E White 48
    ZONE  422676666666762056776676246666666203323324256676
    NUMR  DE0721E496CF21093F54852E0D17EFC91098001505078945

2   CHAR  M. Campbellii... .80 20 D Rose 30
    ZONE  422466766666600020332332425676
    NUMR  DE031D025CC9999909800200402F35

3   CHAR  M. Liliflora   .Lily Magnolia     .12  4 D Purple 49
    ZONE  4224666666762220466724666666622222033223242577766
    NUMR  DE0C9C96CF210009C9C90D17EFC91000009120040400520C5

4   CHAR  M. soulangiana .Saucer Magnolia   .25  3 D Pink 47
    ZONE  42276766666666205676672466666662220332232425666
    NUMR  DE03F5C1E791E1093153520D17EFC9100092500304009EB

5   CHAR  M. Stellata    .Star Magnolia     .10  3 D White 48
    ZONE  422576666762222057672466666662222203322324256676
    NUMR  DE0345CC1410000934120D17EFC910000091000304078945&lt;/PRE&gt;
&lt;P&gt;You can still use SAS to read this file as is, but should you? &amp;nbsp;I see that you are using SAS University Edition and maybe you are working through a learning&amp;nbsp;exercise. &amp;nbsp;Is the purpose of this to learn how to write code to parse irregular data? &amp;nbsp;Or was there a transcription error in the process of creating the input file? &amp;nbsp;This community can help you either way, but we need more information about your objective.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 20:33:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/335402#M75902</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2017-02-23T20:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/336362#M76241</link>
      <description>&lt;P&gt;Hello Chris,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your suggestion.&lt;/P&gt;&lt;P&gt;Truly, I am working through a learning exercise on UE.But the codes provided by all the community members are not yielding the ultimate result expected.&lt;/P&gt;&lt;P&gt;Of course, &lt;SPAN&gt;&amp;nbsp;line 2 has a missing (denoted with blank ) variable character value ( 'sci_name') and the 'sale_qty' (80) is also rightly under and over other corresponding values in the preceding and following values in the text file as in my orginal post. There is an attached &amp;nbsp;file shared with Reeza too if you would like to see.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anyway, I am overwhelmed by the community support received and look forward to keeping in touch.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 22:07:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/336362#M76241</guid>
      <dc:creator>inquistive</dc:creator>
      <dc:date>2017-02-27T22:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/336364#M76242</link>
      <description>&lt;P&gt;Are you learning how to clean data?&lt;/P&gt;
&lt;P&gt;Other than that, this would be an exercise in futility.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My suggestion would be to dump the file to Excel and clean it up by hand.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's not a heck of a lot of benefit to reading in a file of this nature, besides learning. It wouldn't be acceptable for a process that needs to be repeated on any sort of regular basis so it's most likely a one time import.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Log the changes you make in Excel in a document, but fighting with this file will take more effort than it's worth IMO.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 22:13:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/336364#M76242</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-02-27T22:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: request for a solution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/336366#M76243</link>
      <description>&lt;P&gt;The following worked for me. It simply includes a combination of tabs and pipes as delimiters:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data want;
  infile '/folders/myfolders/magnolia.txt' dlm='097c'x dsd;
  informat prefix $2.;
  informat name $25.;
  informat sci_name $25.;
  input prefix name sci_name sale_qty remnant code $ color $;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2017 22:35:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/request-for-a-solution/m-p/336366#M76243</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-02-27T22:35:21Z</dc:date>
    </item>
  </channel>
</rss>

