<?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: infile few line to 1 row record, where to put trailsign. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/infile-few-line-to-1-row-record-where-to-put-trailsign/m-p/354139#M82795</link>
    <description>&lt;P&gt;Hi KurtBremser,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached the sas coding, please advice(let me know if i missunderstood your request).&lt;/P&gt;</description>
    <pubDate>Thu, 27 Apr 2017 14:42:38 GMT</pubDate>
    <dc:creator>sagulolo</dc:creator>
    <dc:date>2017-04-27T14:42:38Z</dc:date>
    <item>
      <title>infile few line to 1 row record, where to put trailsign.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-few-line-to-1-row-record-where-to-put-trailsign/m-p/354123#M82788</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;trying to infile text file(fixed width) but stuck with the coding, my sample coding(sorry poor sample) as below:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA TESTING ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;INFILE DATALINES&amp;nbsp; MISSOVER;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;INPUT #1&amp;nbsp; H&amp;nbsp; $ 1-2 I $ 6-9&amp;nbsp; J 13-21&amp;nbsp;&amp;nbsp; K 28-37&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #2&amp;nbsp; L&amp;nbsp; $ 1-2&amp;nbsp;&amp;nbsp;&amp;nbsp; M 13-21&amp;nbsp;&amp;nbsp; N 20-37&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #3&amp;nbsp; O&amp;nbsp; $ 1-2&amp;nbsp;&amp;nbsp;&amp;nbsp; P 13-21&amp;nbsp;&amp;nbsp; Q 20-37 ;&lt;BR /&gt;DATALINES;&lt;BR /&gt;D&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ABC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .00&lt;BR /&gt;Ef&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;23.40-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 456.23&lt;BR /&gt;f&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 234.50-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10000.00-&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;undertstand informat trailsign can read number follow by negative sign, where should i put the trailsign to tell the Sas my data is number follow by negative since i need to inform the position of my data as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 14:19:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-few-line-to-1-row-record-where-to-put-trailsign/m-p/354123#M82788</guid>
      <dc:creator>sagulolo</dc:creator>
      <dc:date>2017-04-27T14:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: infile few line to 1 row record, where to put trailsign.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-few-line-to-1-row-record-where-to-put-trailsign/m-p/354132#M82792</link>
      <description>&lt;P&gt;Please post that step again, but use the {i} or "little running man" icon for posting. Putting code into the main posting window runs havoc on the formatting.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 14:32:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-few-line-to-1-row-record-where-to-put-trailsign/m-p/354132#M82792</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-04-27T14:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: infile few line to 1 row record, where to put trailsign.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-few-line-to-1-row-record-where-to-put-trailsign/m-p/354139#M82795</link>
      <description>&lt;P&gt;Hi KurtBremser,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached the sas coding, please advice(let me know if i missunderstood your request).&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 14:42:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-few-line-to-1-row-record-where-to-put-trailsign/m-p/354139#M82795</guid>
      <dc:creator>sagulolo</dc:creator>
      <dc:date>2017-04-27T14:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: infile few line to 1 row record, where to put trailsign.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-few-line-to-1-row-record-where-to-put-trailsign/m-p/354143#M82796</link>
      <description>&lt;P&gt;To paste code or logs or other raw text use the Insert Code or Insert SAS Code icon on the menu bar in the editor form.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA TESTING ;
	INFILE DATALINES  MISSOVER;
	INPUT #1  H  $ 1-2 I $ 6-9  J 13-21   K 28-37
	      #2  L  $ 1-2    M 13-21   N 20-37
	      #3  O  $ 1-2    P 13-21   Q 20-37 ;
DATALINES;
D     ABC         .00
Ef	 			23.40-         456.23
f	 		   234.50-       10000.00-
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8579iC27E1ADFE033BA8B/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 14:49:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-few-line-to-1-row-record-where-to-put-trailsign/m-p/354143#M82796</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-04-27T14:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: infile few line to 1 row record, where to put trailsign.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-few-line-to-1-row-record-where-to-put-trailsign/m-p/354146#M82797</link>
      <description>&lt;P&gt;thank for highlighted else i won't notice the icon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA TESTING ;
	INFILE DATALINES  MISSOVER;
	INPUT #1  H  $ 1-2 I $ 6-9  J 13-21   K 28-37
	      #2  L  $ 1-2    M 13-21   N 20-37
	      #3  O  $ 1-2    P 13-21   Q 20-37 ;
DATALINES;
D     ABC         .00
Ef	 			23.40-         456.23
f	 		   234.50-       10000.00-
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Apr 2017 14:55:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-few-line-to-1-row-record-where-to-put-trailsign/m-p/354146#M82797</guid>
      <dc:creator>sagulolo</dc:creator>
      <dc:date>2017-04-27T14:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: infile few line to 1 row record, where to put trailsign.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/infile-few-line-to-1-row-record-where-to-put-trailsign/m-p/354150#M82798</link>
      <description>&lt;P&gt;Look at this usage note. &amp;nbsp;&lt;A href="http://support.sas.com/kb/9/675.html" target="_blank"&gt;http://support.sas.com/kb/9/675.html&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;Starting with SAS 9, the TRAILSGNw. informat is available to read
numeric values that contain a trailing minus sign.&lt;/PRE&gt;
&lt;P&gt;So change your input specification from&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;P 13-21 &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;@13 P trailsgn9.  &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS. &amp;nbsp;Please use the TRUNCOVER option on the INFILE statement instead of the MISSOVER option. &amp;nbsp;It should not make a difference if you are reading from in-line card images like this data step. &amp;nbsp;But if you tried to read these trailing sign values from an external file it could make a huge difference. &amp;nbsp;If the lines in the file are not padded with spaces and the last value on the line is positive then you would end up telling SAS to read 9 characters (TRAILSGN9.) when only 8 would be available. With MISSOVER you will get a missing value. With TRUNCOVER you will get your value. &amp;nbsp;Here is an example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename test temp;
data _null_;
  file test;
  put '105.2-';
  put '105.2' ;
run;
data test1;
 infile test missover ;
  input x trailsgn6. ;
run;
data test2;
 infile test truncover ;
  input x trailsgn6. ;
run;
proc compare data=test1 compare=test2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In general you should always use TRUNCOVER instead of MISSOVER. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2017 15:30:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/infile-few-line-to-1-row-record-where-to-put-trailsign/m-p/354150#M82798</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-04-27T15:30:33Z</dc:date>
    </item>
  </channel>
</rss>

