<?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: Input modifier &amp;amp; and Colon in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/413210#M4007</link>
    <description>thanks for your help</description>
    <pubDate>Tue, 14 Nov 2017 06:33:52 GMT</pubDate>
    <dc:creator>bondtk</dc:creator>
    <dc:date>2017-11-14T06:33:52Z</dc:date>
    <item>
      <title>Input modifier &amp; and Colon</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412754#M3971</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have got this data which I am using as text file input:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;I&gt;data ORION.LOCATIONRAWFILE;&lt;BR /&gt;&amp;nbsp; infile datalines dsd truncover;&lt;BR /&gt;&amp;nbsp; input price:$15.&amp;nbsp; Address:$20. Style:$8. Zip:32. Bedroom:32. Baths:32.;&lt;BR /&gt;datalines4;&lt;BR /&gt;"64,000",sheppard Avenue,Ranch,1250,2,1&lt;BR /&gt;"65,850",Rand Street,Split,1190,1,1&lt;BR /&gt;"80,050",Market Street,Condo,1400,2,1.5&lt;BR /&gt;"107,250",Garris Street,TwoStory,1810,4,3&lt;BR /&gt;"86,650",Kemble Avenue,Ranch,1500,3,3&lt;BR /&gt;"94,450",West Drive,Split,1615,4,3&lt;BR /&gt;"73,650",Graham Avenue,Split,1305,3,1.5&lt;BR /&gt;;;;;&lt;/I&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;I&gt;I am reading this txt file and Ii gives me the desired result that I want.&lt;/I&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data orion.locationrawfile;&lt;BR /&gt;infile "/folders/myfolders/pg2/location.txt" &amp;nbsp;dlm=',' dsd ;&lt;BR /&gt;length Address $20;&lt;BR /&gt;input Style $&amp;nbsp; Zip Bedroom&amp;nbsp;&amp;nbsp; Baths&amp;nbsp; Address&amp;nbsp; $&amp;nbsp; Price : dollar8. ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data = orion.locationrawfile noobs;&lt;BR /&gt;var Style Zip Bedroom Baths Address Price;&lt;BR /&gt;format price dollar8.;&lt;BR /&gt;format baths best.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question:&amp;nbsp; I am using the Colon input with Price ,&amp;nbsp; I am using the length statement for address:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I remove length statement for address and try to use &amp;amp; sign with the character length $20, it gives as error,&lt;/P&gt;&lt;P&gt;Is that possible to remove the length statement and use code as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data orion.locationrawfile;&lt;/P&gt;&lt;P&gt;infile "/folders/myfolders/pg2/location.txt"&amp;nbsp; dlm=',' dsd ;&lt;/P&gt;&lt;P&gt;input Style $&amp;nbsp; Zip Bedroom&amp;nbsp;&amp;nbsp; Baths&amp;nbsp; Address &amp;amp; $20.&amp;nbsp; Price : dollar8. ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got an error in the output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise if &amp;amp; works like this or some other modification is required without using the length statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;TK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Nov 2017 23:56:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412754#M3971</guid>
      <dc:creator>bondtk</dc:creator>
      <dc:date>2017-11-12T23:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Input modifier &amp; and Colon</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412758#M3972</link>
      <description>&lt;P&gt;It is not clear what you mean by the &amp;amp; sign.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The INPUT statement accepts variable names and their informats,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then maybe you want to code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input Style $  Zip Bedroom   Baths  Address $20.  Price : dollar8. ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When you got error in log it will be efficient to post the log with the error message.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 00:27:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412758#M3972</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-11-13T00:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Input modifier &amp; and Colon</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412780#M3975</link>
      <description>&lt;P&gt;In an INPUT statement, &amp;amp; means to keep on going until you hit two delimiters in a row.&amp;nbsp; That would throw off the value of the variables that follow, since your data never has two delimiters in a row.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 01:16:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412780#M3975</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-11-13T01:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Input modifier &amp; and Colon</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412827#M3977</link>
      <description>&lt;P&gt;Hi Shmuel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your reply, if I use your code and don't use length statement then I have got the mismatched output, I am attaching the notes&lt;/P&gt;&lt;P&gt;and the error. The reason I was trying to use ampersand sign as there is a space between the address fields.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so with this code I didn't get the desired output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token keyword"&gt;input&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;Style&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;$&lt;/SPAN&gt;&amp;nbsp; Zip Bedroom&amp;nbsp;&amp;nbsp; Baths&amp;nbsp; Address &lt;SPAN class="token punctuation"&gt;$&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;20&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&amp;nbsp; Price : dollar8&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;;&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, 13 Nov 2017 09:55:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412827#M3977</guid>
      <dc:creator>bondtk</dc:creator>
      <dc:date>2017-11-13T09:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Input modifier &amp; and Colon</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412828#M3978</link>
      <description>&lt;P&gt;Hi Astounding&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply, the reason I tried to use ampersand sign as I saw this code in this example below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ampersand (&lt;STRONG&gt;&amp;amp;&lt;/STRONG&gt;) modifier allows you to read character values that contain embedded blanks.&lt;/P&gt;&lt;P&gt;As you can see the space between New York and then use the $12. instead of length statement, but it didn't work in&lt;/P&gt;&lt;P&gt;my case when I try to use the similar statement without length statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;input Style $&amp;nbsp; Zip Bedroom&amp;nbsp;&amp;nbsp; Baths&amp;nbsp; Address &amp;amp;&amp;nbsp; $20. Price : dollar8. ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DATA citypops;
   infile DATALINES FIRSTOBS = 2;
   input city &amp;amp; $12. pop2000;
   DATALINES;
City  Yr2000Popn
New York  8008278
Los Angeles  3694820
Chicago  2896016
Houston  1953631
Philadelphia  1517550
Phoenix  1321045
San Antonio  1144646
San Diego  1223400
Dallas  1188580
San Jose  894943
;
RUN;

PROC PRINT data = citypops;
   title 'The citypops data set';
   format pop2000 comma10.;
RUN;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 10:07:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412828#M3978</guid>
      <dc:creator>bondtk</dc:creator>
      <dc:date>2017-11-13T10:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Input modifier &amp; and Colon</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412840#M3979</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pay attention:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;using&amp;nbsp; &lt;STRONG&gt;&amp;amp;&lt;/STRONG&gt; worked well as long as &lt;STRONG&gt;CITY&lt;/STRONG&gt; contained one string (like: Philadelphy)&amp;nbsp; or two strings (like San Diego)&lt;/P&gt;
&lt;P&gt;but issued message &lt;STRONG&gt;LOST CARD&lt;/STRONG&gt; when CITY contained more strings (tested:&amp;nbsp; San Diego CA).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would prefer using either a delimiter (other then space) or a fix format input.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 11:39:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412840#M3979</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-11-13T11:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Input modifier &amp; and Colon</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412846#M3980</link>
      <description>One more point - you need at least two spaces after city in order that &amp;amp; should work properly !</description>
      <pubDate>Mon, 13 Nov 2017 11:50:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412846#M3980</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-11-13T11:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Input modifier &amp; and Colon</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412891#M3984</link>
      <description>&lt;P&gt;This example is perfectly fine.&amp;nbsp; The &amp;amp; instructs SAS to keep reading until it finds two consecutive delimiters.&amp;nbsp; (Just for the record, that does mean that&amp;nbsp; you could read multiple fields, not just two, as long as there is only a single blank between each word.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A LENGTH statement might be needed because the default length using list input is $8.&amp;nbsp; So compare the results here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test;&lt;/P&gt;
&lt;P&gt;length city1 $ 40;&lt;/P&gt;
&lt;P&gt;input city1 &amp;amp; @1 city2 $ &amp;amp;;&lt;/P&gt;
&lt;P&gt;cards;&lt;/P&gt;
&lt;P&gt;San Diego CA&lt;/P&gt;
&lt;P&gt;San Francisco CA&lt;/P&gt;
&lt;P&gt;Two Blanks&amp;nbsp;&amp;nbsp; Somewhere&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your original example is complicated by the fact that you are using commas instead of blanks as delimiters.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 13:50:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412891#M3984</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-11-13T13:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Input modifier &amp; and Colon</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412918#M3985</link>
      <description>&lt;P&gt;If you are using DSD option then there should be no need for the &amp;amp; modifier. That DSD option means that SAS should treat two adjacent delimiters as representing a null value.&amp;nbsp; The &amp;amp; says to look for two (or more) delimiters between "words" in the input line.&amp;nbsp; You would NOT use &amp;amp; when using the DSD option.&amp;nbsp; Also note that if you are not using the DSD option then you should make sure to represent missing values (numeric or character) by a period in the data line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the first place that you reference a variable is in the INPUT statement then SAS must guess at what type of variable you mean by looking at how you used it in the INPUT statement.&amp;nbsp; So if you use an INFORMAT in the INPUT statement SAS will define a variable that is appropriate for that informat.&amp;nbsp; Or if you just use the bare $ then SAS will know you want to define a character variable. Note that if you have already defined the variable there is no need to add a bare $ in the input statement since SAS already knows the variable is character.&amp;nbsp; If SAS cannot tell what length to use then it will assign new character variables a length of $8.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that SAS will similarly make a guess about how to define a variable whenever it is used before it is defined.&amp;nbsp; You can define a variable by sourcing it from another dataset or using the LENGTH or ATTRIB statement to define it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general you will have fewer headaches if you just get in the habit of defining your variables before using them.&amp;nbsp; For example your first data step might look like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ORION.LOCATIONRAWFILE;
  length price $15 Address $20 Style $8 Zip 8 Bedroom 8 Baths 8;
  infile datalines dsd truncover;
  input price Address Style Zip Bedroom Baths ;
datalines4;
"64,000",sheppard Avenue,Ranch,1250,2,1
"65,850",Rand Street,Split,1190,1,1
"80,050",Market Street,Condo,1400,2,1.5
"107,250",Garris Street,TwoStory,1810,4,3
"86,650",Kemble Avenue,Ranch,1500,3,3
"94,450",West Drive,Split,1615,4,3
"73,650",Graham Avenue,Split,1305,3,1.5
;;;;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But really that first column looks like a number. Don't let the quotes fool you into thinking it is a character variable. The quotes are just there because they are required whenever a value contains the delimiter.&amp;nbsp; To read a number with a comma in it you will need to use the COMMA informat.&amp;nbsp; (or the DOLLAR informat, but they are really the same thing).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ORION.LOCATIONRAWFILE;
  length price 8 Address $20 Style $8 Zip 8 Bedroom 8 Baths 8;
  infile datalines dsd truncover;
  input price Address Style Zip Bedroom Baths ;
  informat price comma.;
datalines4;
"64,000",sheppard Avenue,Ranch,1250,2,1
"65,850",Rand Street,Split,1190,1,1
"80,050",Market Street,Condo,1400,2,1.5
"107,250",Garris Street,TwoStory,1810,4,3
"86,650",Kemble Avenue,Ranch,1500,3,3
"94,450",West Drive,Split,1615,4,3
"73,650",Graham Avenue,Split,1305,3,1.5
;;;;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 14:54:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412918#M3985</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-11-13T14:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Input modifier &amp; and Colon</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412920#M3986</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/137395"&gt;@bondtk&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I am lucky as I intended to help and found myself learning somthing new.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 14:39:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/412920#M3986</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-11-13T14:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Input modifier &amp; and Colon</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/413175#M4003</link>
      <description>&lt;P&gt;Hi Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have slightly changed the code , instead of using informat statement , I used the informat in the input statement and it worked as well,&lt;/P&gt;&lt;P&gt;please advise is it right thing to do.&amp;nbsp; input price : comma. Address Style Zip Bedroom Baths ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ORION.LOCATIONRAWFILE;&lt;BR /&gt;&amp;nbsp; length price 8 Address $20 Style $8 Zip 8 Bedroom 8 Baths 8;&lt;BR /&gt;&amp;nbsp; infile datalines dsd truncover;&lt;BR /&gt;&amp;nbsp; input price : dollar10. Address Style Zip Bedroom Baths ;&lt;/P&gt;&lt;P&gt;datalines4;&lt;BR /&gt;"64,000",sheppard Avenue,Ranch,1250,2,1&lt;BR /&gt;"65,850",Rand Street,Split,1190,1,1&lt;BR /&gt;"80,050",Market Street,Condo,1400,2,1.5&lt;BR /&gt;"107,250",Garris Street,TwoStory,1810,4,3&lt;BR /&gt;"86,650",Kemble Avenue,Ranch,1500,3,3&lt;BR /&gt;"94,450",West Drive,Split,1615,4,3&lt;BR /&gt;"73,650",Graham Avenue,Split,1305,3,1.5&lt;BR /&gt;;;;;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data =orion.locationrawfile;&lt;BR /&gt;format price dollar10.;&lt;BR /&gt;format baths best.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;!--  See if Accepted Solutions is enabled  --&gt;&lt;/P&gt;&lt;DIV class="lia-quilt-row lia-quilt-row-forum-message-footer"&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-04 lia-quilt-column-left lia-quilt-column-footer-left"&gt;&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-left"&gt;&lt;DIV class="lia-message-notify lia-component-report-abuse"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="lia-message-statistics lia-component-position-in-thread"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-quilt-column lia-quilt-column-10 lia-quilt-column-inner lia-quilt-column-footer-center"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Nov 2017 02:57:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/413175#M4003</guid>
      <dc:creator>bondtk</dc:creator>
      <dc:date>2017-11-14T02:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Input modifier &amp; and Colon</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/413194#M4005</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/137395"&gt;@bondtk&lt;/a&gt;, my note is not the solution. It doesn't answer your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The best way to learn is to try run the code with several combinations and compare results.&lt;/P&gt;
&lt;P&gt;Thus beside reading the documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your first question was:&lt;/P&gt;
&lt;PRE&gt;If I remove length statement for address and try to use &amp;amp; sign with the character length $20, it gives as error,
Is that possible to remove the length statement and use code as below:
 
data orion.locationrawfile;
infile "/folders/myfolders/pg2/location.txt"  dlm=',' dsd ;
input Style $  Zip Bedroom   Baths  Address &amp;amp; $20.  Price : dollar8. ;
 
I got an error in the output.&lt;/PRE&gt;
&lt;P&gt;so, if you got error then you might not remove the lengh.&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/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;gave the right answer:&lt;/P&gt;
&lt;PRE&gt;A LENGTH statement might be needed because the default length using list input is $8.  &lt;BR /&gt;So compare the results here:&lt;/PRE&gt;
&lt;P&gt;and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;detailed the rules to use &amp;amp; in input statement.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 04:25:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/413194#M4005</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-11-14T04:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Input modifier &amp; and Colon</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/413209#M4006</link>
      <description>&lt;P&gt;That works as long as you make sure to include the : modifier before the informat in the INPUT statement.&lt;/P&gt;
&lt;P&gt;There is no need at add the statement&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;format baths best.;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to the proc print step.&amp;nbsp; SAS will already use the BEST12. format for numeric variables that do not have an attached format.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 06:28:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/413209#M4006</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-11-14T06:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Input modifier &amp; and Colon</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/413210#M4007</link>
      <description>thanks for your help</description>
      <pubDate>Tue, 14 Nov 2017 06:33:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Input-modifier-amp-and-Colon/m-p/413210#M4007</guid>
      <dc:creator>bondtk</dc:creator>
      <dc:date>2017-11-14T06:33:52Z</dc:date>
    </item>
  </channel>
</rss>

