<?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: is it possible to read data from right to left? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30239#M7149</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course, for l, you mean length(_infile_), but very nice solution!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jul 2011 19:51:46 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2011-07-13T19:51:46Z</dc:date>
    <item>
      <title>is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30228#M7138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose I have data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;001F36175180&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable description for this data is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID: columns1-3&lt;/P&gt;&lt;P&gt;Sex: columns 4&lt;/P&gt;&lt;P&gt;Age: columns 5-6&lt;/P&gt;&lt;P&gt;Height: columns 7-9&lt;/P&gt;&lt;P&gt;Weight: columns 10-12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I can read in this data using code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@1 ID $3.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@4 Sex $1.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@5 Age 2.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@7 Height 3.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@10 Weight 3.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the above method is to read data from left to right; my question is, is there a way to read data from right to left, such as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@12 Weight -3.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@9 Height -3..&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@6&amp;nbsp; Age -2.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@4 Sex -1.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@3 ID -3.;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 02:43:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30228#M7138</guid>
      <dc:creator>littlestone</dc:creator>
      <dc:date>2011-07-13T02:43:11Z</dc:date>
    </item>
    <item>
      <title>is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30229#M7139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not?&amp;nbsp; As long as you use the correct starting positions and formats.&amp;nbsp; e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input&amp;nbsp; &lt;/P&gt;&lt;P&gt;@10 Weight 3.&lt;/P&gt;&lt;P&gt;@7 Height 3.&lt;/P&gt;&lt;P&gt;@5&amp;nbsp; Age 2.&lt;/P&gt;&lt;P&gt;@4 Sex $1.&lt;/P&gt;&lt;P&gt;@1 ID $3.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;001F36175180&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Art&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 03:40:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30229#M7139</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-07-13T03:40:32Z</dc:date>
    </item>
    <item>
      <title>is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30230#M7140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But isn't that still left to right within the fields.&amp;nbsp; I think "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;littlestone" is implying with minus sign in front of informat that the field should be right to left not just the record.&amp;nbsp; The only thing I can think of is to reverse the value of _INFILE_ but that is a bit awkward. &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'SAS Monospace';"&gt;1799&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile cards;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'SAS Monospace';"&gt;1800&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'SAS Monospace';"&gt;1801&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _infile_ = reverse(_infile_);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'SAS Monospace';"&gt;1802&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input&amp;nbsp; Weight 69-71;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'SAS Monospace';"&gt;1803&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put weight=;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'SAS Monospace';"&gt;1804&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; list;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'SAS Monospace';"&gt;1805&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cards;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'SAS Monospace';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'SAS Monospace';"&gt;Weight=81&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'SAS Monospace';"&gt;RULE:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: black; font-family: 'SAS Monospace';"&gt;1806&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;&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;&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;&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; 08157163F100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: blue; font-family: 'SAS Monospace';"&gt;NOTE: The data set WORK.HAVE has 1 observations and 1 variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 09:07:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30230#M7140</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-07-13T09:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30231#M7141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use Column Input to read from right to left.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; color: #0000ff; font-family: courier new,courier;"&gt;DATA DSN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; color: #0000ff; font-family: courier new,courier;"&gt;&amp;nbsp; INPUT WEIGHT 10-12 HEIGHT 7-9 AGE 5-6 SEX $ 4-4 ID 1-3;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; color: #0000ff; font-family: courier new,courier;"&gt;DATALINES;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; color: #0000ff; font-family: courier new,courier;"&gt;001F36175180&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; color: #0000ff; font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; color: #0000ff; font-family: courier new,courier;"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; color: #0000ff; font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; color: #0000ff; font-family: courier new,courier;"&gt;PROC PRINT DATA = DSN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; color: #0000ff; font-family: courier new,courier;"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; color: #0000ff; font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #0000ff; font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;Thanks &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000000; font-family: arial,helvetica,sans-serif;"&gt;Dhanasekaran R &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 09:13:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30231#M7141</guid>
      <dc:creator>dhana</dc:creator>
      <dc:date>2011-07-13T09:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30232#M7142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DN,&amp;nbsp; Of course you might be correct but, if so, what about the reverse informat?&amp;nbsp; Art&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 12:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30232#M7142</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-07-13T12:11:37Z</dc:date>
    </item>
    <item>
      <title>is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30233#M7143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am asking this question because I have a dataset that needs to be read CONDITIONALLY. It seems to me that the data will be easier to manipultae if read from right to left, but, just as data_null_ said, the code&amp;nbsp; looks kind of awkward. I am just wondering if there is some "nicer looking" code can do the job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 15:39:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30233#M7143</guid>
      <dc:creator>littlestone</dc:creator>
      <dc:date>2011-07-13T15:39:40Z</dc:date>
    </item>
    <item>
      <title>is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30234#M7144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Littlestone.&amp;nbsp; Are you trying to read the data conditionally, based upon a value in a specific field ? Or is the data in reverse order in the flat file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are trying to read the data based upon a field within the data, such as length then use the @@ to "pause" reading the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data results;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;input&amp;nbsp; &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@1 ID $3.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@4 Sex $1.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@5 Age 2.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@@ ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if age &amp;lt; 10 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input&amp;nbsp; ;&amp;nbsp;&amp;nbsp; * no height or weight for children under 10;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;else do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@7 Height 3.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;@10 Weight 3.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;001F36175180&lt;/P&gt;&lt;P&gt;001F01&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise,, &lt;/P&gt;&lt;P&gt;just read in the whole line and use the reverse function;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 17:19:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30234#M7144</guid>
      <dc:creator>kevin_123</dc:creator>
      <dc:date>2011-07-13T17:19:43Z</dc:date>
    </item>
    <item>
      <title>is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30235#M7145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much, Kevin, your answer is very close to what I am looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, part of my problem is that the length of variable Age is not constant (all other variables has defined length). Suppose I have following data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;001F&lt;STRONG&gt;36&lt;/STRONG&gt;175180&lt;/P&gt;&lt;P&gt;002F&lt;STRONG&gt;9&lt;/STRONG&gt;120100&lt;/P&gt;&lt;P&gt;003F&lt;STRONG&gt;110&lt;/STRONG&gt;180160&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The age for the above three observations are 36, 9 and 110, respectively. Because of different length of Age (2, 1 and 3, in this example), the starting column for the next variable &lt;STRONG&gt;Height &lt;/STRONG&gt;keeps changing, making it difficult to determine where to start reading Height if data has to be read from left to right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 18:36:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30235#M7145</guid>
      <dc:creator>littlestone</dc:creator>
      <dc:date>2011-07-13T18:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30236#M7146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you can determine the length of the record and subtract the lenght of the know fields then the rest is... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;filename&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; FT15F001 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;temp&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;infile&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; FT15F001 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;length&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;=l;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; id &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: teal; font-family: 'Courier New'; background-color: white;"&gt;$3.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; sex &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: teal; font-family: 'Courier New'; background-color: white;"&gt;$1.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;&amp;nbsp;&amp;nbsp; w = l-(&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;3&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;+&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;+(&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;*&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;3&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;)); &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: green; font-family: 'Courier New'; background-color: white;"&gt;*minus know field widths;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;(w);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;) input age &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;1.&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;) input age &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;2.&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;(&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;3&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;) input age &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;3.&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; (height weight) (&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;3.&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;parmcards&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;001F36175180&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;002F9120100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;003F110180160&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;;;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;print&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 18:49:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30236#M7146</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-07-13T18:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30237#M7147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or, similarly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input &lt;/P&gt;&lt;P&gt;&amp;nbsp; @1 ID $3.&lt;/P&gt;&lt;P&gt;&amp;nbsp; @4 Sex $1.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; _infile_=strip(reverse(_infile_));&lt;/P&gt;&lt;P&gt;&amp;nbsp; weight=input(reverse(substr(_infile_,1,3)),3.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; height=input(reverse(substr(_infile_,4,3)),3.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; age=input(substr(reverse(_infile_),5,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; length(_infile_)-10),3.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;001F36175180&lt;/P&gt;&lt;P&gt;002F9120100&lt;/P&gt;&lt;P&gt;003F110180160&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 19:08:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30237#M7147</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-07-13T19:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30238#M7148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of the Select statement, just read age using the $varying informat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input id $3. sex $1. @;&lt;/P&gt;&lt;P&gt;w = l-(3+1+(2*3)); *minus know field widths;&lt;/P&gt;&lt;P&gt;input age $varying. w (height weight) (3.); &lt;/P&gt;&lt;PRE ___default_attr="plain" jivemacro="code"&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 19:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30238#M7148</guid>
      <dc:creator>FloydNevseta</dc:creator>
      <dc:date>2011-07-13T19:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30239#M7149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course, for l, you mean length(_infile_), but very nice solution!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2011 19:51:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30239#M7149</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-07-13T19:51:46Z</dc:date>
    </item>
    <item>
      <title>is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30240#M7150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all. I really learned a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 02:22:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30240#M7150</guid>
      <dc:creator>littlestone</dc:creator>
      <dc:date>2011-07-14T02:22:52Z</dc:date>
    </item>
    <item>
      <title>is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30241#M7151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;P&gt;SAS_Bigot wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of the Select statement, just read age using the $varying informat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input id $3. sex $1. @;&lt;/P&gt;&lt;P&gt;w = l-(3+1+(2*3)); *minus know field widths;&lt;/P&gt;&lt;P&gt;input age $varying. w (height weight) (3.); &lt;/P&gt;&lt;PRE ___default_attr="plain" jivemacro="code"&gt;&lt;/PRE&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;I think age should be numeric.&amp;nbsp; So you will need to read it again with INPUT function.&amp;nbsp; Six of one, half dozen of the other.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 12:37:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30241#M7151</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-07-14T12:37:50Z</dc:date>
    </item>
    <item>
      <title>is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30242#M7152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good that you learned. The person who prepared the file also has things to learn. The design is very bad. Were there two variable-length fields instead of one, it would have been difficult if not impossible to parse.&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;P&gt;littlestone wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all. I really learned a lot.&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2011 13:19:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30242#M7152</guid>
      <dc:creator>Howles</dc:creator>
      <dc:date>2011-07-14T13:19:21Z</dc:date>
    </item>
    <item>
      <title>is it possible to read data from right to left?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30243#M7153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not&amp;nbsp; parse the whole row to get this age?If height weight were 3 width, id were 3 width, sex were 1 width ,always.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;filename FT15F001 temp;
data _null_;
&amp;nbsp;&amp;nbsp; infile FT15F001 truncover;
&amp;nbsp;&amp;nbsp; input row $100.;
age=input(substr(row,5,length(row)-10),best8.);
put age=;
&amp;nbsp;&amp;nbsp; parmcards;
001F36175180
002F9120100
003F110180160
;;;;
&amp;nbsp;&amp;nbsp; run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2011 06:23:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/is-it-possible-to-read-data-from-right-to-left/m-p/30243#M7153</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-07-15T06:23:00Z</dc:date>
    </item>
  </channel>
</rss>

