<?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 help with input/ Datalines in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/help-with-input-Datalines/m-p/324952#M72212</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have the code&lt;/P&gt;
&lt;P&gt;data name;&lt;BR /&gt;input name $32.;&lt;BR /&gt;datalines;&lt;/P&gt;
&lt;P&gt;a&lt;/P&gt;
&lt;P&gt;b&lt;/P&gt;
&lt;P&gt;c&lt;/P&gt;
&lt;P&gt;;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to make it as below to save space.&lt;/P&gt;
&lt;P&gt;how can I tell SAS to take space as a break?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data name;&lt;BR /&gt;input name $32.;&lt;BR /&gt;datalines;&lt;/P&gt;
&lt;P&gt;a b c d e f ....&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;HHC&lt;/P&gt;</description>
    <pubDate>Mon, 16 Jan 2017 03:24:04 GMT</pubDate>
    <dc:creator>hhchenfx</dc:creator>
    <dc:date>2017-01-16T03:24:04Z</dc:date>
    <item>
      <title>help with input/ Datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-input-Datalines/m-p/324952#M72212</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have the code&lt;/P&gt;
&lt;P&gt;data name;&lt;BR /&gt;input name $32.;&lt;BR /&gt;datalines;&lt;/P&gt;
&lt;P&gt;a&lt;/P&gt;
&lt;P&gt;b&lt;/P&gt;
&lt;P&gt;c&lt;/P&gt;
&lt;P&gt;;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to make it as below to save space.&lt;/P&gt;
&lt;P&gt;how can I tell SAS to take space as a break?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data name;&lt;BR /&gt;input name $32.;&lt;BR /&gt;datalines;&lt;/P&gt;
&lt;P&gt;a b c d e f ....&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;HHC&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2017 03:24:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-input-Datalines/m-p/324952#M72212</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-01-16T03:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: help with input/ Datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-input-Datalines/m-p/324958#M72214</link>
      <description>&lt;P&gt;Consider that you have a dataset name with variable name and id with common value and you want to derive namec as mentioned. Then please try the below code. Also for this you need a dummy variable id with common values across all records so that we could use the first. logic.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you could create a dummy id variable and try the below logic and it will work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data name;
input name :$32. id;
datalines;
a 1
b 1 
c 1
d 1
e 1
f 1
g 1
h 1
;run;

data namewant;
length namec $32;
set name;
by id notsorted;
retain namec;
if first.id then namec=name ;
else namec=catx(' ',namec,name);
if last.id; 
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jan 2017 04:04:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-input-Datalines/m-p/324958#M72214</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-01-16T04:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: help with input/ Datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-input-Datalines/m-p/324963#M72216</link>
      <description>&lt;P&gt;Read about the double trailling&amp;nbsp;@ in the doc about the &lt;STRONG&gt;input&lt;/STRONG&gt; statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data name;
input name :$32. @@;
datalines;
a b c d e f
;

proc print; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jan 2017 04:59:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-input-Datalines/m-p/324963#M72216</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-01-16T04:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: help with input/ Datalines</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-with-input-Datalines/m-p/324995#M72223</link>
      <description>&lt;P&gt;Am not sure what you mean really: "&lt;SPAN&gt;I want to make it as below to save space.". &amp;nbsp;What you are doing is taking normalised data, transposing and concatenting that data into one observation. &amp;nbsp;If you wanted to save "space" - i.e. storage space then you can save yourself the difficulty and just set:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;input name $32.;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;To:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;input name $1.;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Transposing the data may make accessing that data far harder than it currently is (and you may hit limitations on string size and such like). &amp;nbsp;Maye a good example to show test data which really illustrates your problem, and why you are doing it?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2017 09:23:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-with-input-Datalines/m-p/324995#M72223</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-01-16T09:23:38Z</dc:date>
    </item>
  </channel>
</rss>

