<?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: How to add blank colums to an existing dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483428#M125350</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is one way.&amp;nbsp; For example if you want to add two blank variables to the dataset have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input one two three;&lt;BR /&gt;cards;&lt;BR /&gt;1 2 3&lt;BR /&gt;1 2 3&lt;BR /&gt;1 2 3&lt;BR /&gt;;&lt;BR /&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;length four five 3;&lt;BR /&gt;call missing(four, five);&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Aug 2018 14:50:29 GMT</pubDate>
    <dc:creator>ghosh</dc:creator>
    <dc:date>2018-08-02T14:50:29Z</dc:date>
    <item>
      <title>How to add blank colums to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483421#M125347</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to add blank columns to an existing Dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you suggest?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nazanin&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 14:39:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483421#M125347</guid>
      <dc:creator>NazaninSAS</dc:creator>
      <dc:date>2018-08-02T14:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to add blank colums to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483424#M125348</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;

set sashelp.class;

char_blank=' ';

num_blank=.;

run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 14:41:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483424#M125348</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-02T14:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to add blank colums to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483427#M125349</link>
      <description>&lt;P&gt;Providing some information would be a start.&amp;nbsp; Do you want numeric columns, character columns, lengths, labels, do you want a list with a prefix?&amp;nbsp; Show an example.&amp;nbsp; Can be a simple as:&lt;/P&gt;
&lt;PRE&gt;data want;
  set have;
  array want{10} $100;
run;&lt;/PRE&gt;
&lt;P&gt;For 10 character 100 length variables.&amp;nbsp; Provide some information for an accurate answer.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 14:50:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483427#M125349</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-02T14:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to add blank colums to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483428#M125350</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is one way.&amp;nbsp; For example if you want to add two blank variables to the dataset have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input one two three;&lt;BR /&gt;cards;&lt;BR /&gt;1 2 3&lt;BR /&gt;1 2 3&lt;BR /&gt;1 2 3&lt;BR /&gt;;&lt;BR /&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;length four five 3;&lt;BR /&gt;call missing(four, five);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 14:50:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483428#M125350</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2018-08-02T14:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to add blank colums to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483435#M125352</link>
      <description>&lt;P&gt;1) You cannot add columns to an existing data set. You may create a new version of the data with the same name and different columns but adding to an "existing" is not going to happen.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) Describe exactly what kind of columns as SAS has two data types, numeric and character. And once created they do not change.&lt;/P&gt;
&lt;P&gt;Character variables have a property of "length" that limits how many characters. Some ways of creating a variable may only have a length of 1 character, which means if later that you want have it hold anything longer than one character you can't. Numeric fields also have a length but unless you go out of your way to make it smaller it will hold the largest/smallest values that SAS will use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) Adding the columns before use is likely not very useful unless you are going to manually type in values. Otherwise add the column when needed. If you combine a data set without a specific column with one that has that column the resulting combination will have that variable with blank/missing values (unless you do something during the combination to add values).&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 15:03:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483435#M125352</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-02T15:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to add blank colums to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483436#M125353</link>
      <description>&lt;P&gt;one more way&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
Alter table have add column1 char (5), column2 num;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Aug 2018 15:03:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483436#M125353</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2018-08-02T15:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to add blank colums to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483444#M125356</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;I used this code:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SelfID3WNewCoulm;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; work.SelfID3;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;F1=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;' '&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;F2=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;' '&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;F3=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;' '&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;number=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;but how can I specify that F1, F2, and F2 to have 3-character length?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Thanks,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Nazanin&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 15:25:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483444#M125356</guid>
      <dc:creator>NazaninSAS</dc:creator>
      <dc:date>2018-08-02T15:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to add blank colums to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483445#M125357</link>
      <description>&lt;P&gt;Revised:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;SelfID3WNewCoulm;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;work.SelfID3;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;length f1 f2 f3 $3;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;call missing(of f: );&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;number=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="2" color="#008080"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 15:27:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483445#M125357</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-02T15:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to add blank colums to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483446#M125358</link>
      <description>&lt;P&gt;&lt;SPAN&gt;call missing(of f: );&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;f:&amp;nbsp; &lt;/STRONG&gt;is a variable list i.e series of f variables in sequence like &lt;STRONG&gt;f1-fn&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Call missing &lt;/STRONG&gt;assigns missing or in other words blank values to the&lt;STRONG&gt; variable list f:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The length statement assigns the length and also helps compiler determine that f1-f3 are of type character&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 15:31:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483446#M125358</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-02T15:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to add blank colums to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483447#M125359</link>
      <description>&lt;P&gt;this is my new code:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SelfID3WNewCoulm;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; work.SelfID3;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;length&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;f1&amp;nbsp;f2&amp;nbsp;f3 $&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;f1=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;''&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;f2=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;''&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;f3=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;''&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;number=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 15:32:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483447#M125359</guid>
      <dc:creator>NazaninSAS</dc:creator>
      <dc:date>2018-08-02T15:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to add blank colums to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483448#M125360</link>
      <description>&lt;P&gt;great&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 15:32:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483448#M125360</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-08-02T15:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to add blank colums to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483450#M125361</link>
      <description>&lt;P&gt;I also tried call missing.&lt;/P&gt;&lt;P&gt;it works perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nazanin&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 15:37:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-blank-colums-to-an-existing-dataset/m-p/483450#M125361</guid>
      <dc:creator>NazaninSAS</dc:creator>
      <dc:date>2018-08-02T15:37:52Z</dc:date>
    </item>
  </channel>
</rss>

