<?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: Trying to create a data set with 2 columns and 880 rows using Arrays and Do Loops (or any method in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-create-a-data-set-with-2-columns-and-880-rows-using/m-p/640032#M190520</link>
    <description>&lt;P&gt;What you want is a "cartesian join", easily achieved with proc sql:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
input column1 $;
datalines;
one_1
one_2
;

data two;
input column2 $;
datalines;
two_1
two_2
two_3
;

proc sql;
create table want as
  select one.column1, two.column2
  from one, two
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 15 Apr 2020 08:22:03 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-04-15T08:22:03Z</dc:date>
    <item>
      <title>Trying to create a data set with 2 columns and 880 rows using Arrays and Do Loops (or any method)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-create-a-data-set-with-2-columns-and-880-rows-using/m-p/640027#M190517</link>
      <description>&lt;P&gt;I have two categorical data sets: one with 20 rows, and one with 44 rows.&lt;/P&gt;&lt;P&gt;I need to make one data set which has two columns of 20 x 44 or 880 rows.&lt;/P&gt;&lt;P&gt;I need to keep the data in character format, so don't have to reformat anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd be embarrassed to tell you how much I've researched this, but to no avail (I have learned a lot, though).&lt;/P&gt;&lt;P&gt;But could use your guidance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm guessing it's an array with a&amp;nbsp;do loop, but am open to SQL&amp;nbsp;or anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciated in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2020 08:15:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-create-a-data-set-with-2-columns-and-880-rows-using/m-p/640027#M190517</guid>
      <dc:creator>MelissaM</dc:creator>
      <dc:date>2020-04-15T08:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a data set with 2 columns and 880 rows using Arrays and Do Loops (or any method</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-create-a-data-set-with-2-columns-and-880-rows-using/m-p/640032#M190520</link>
      <description>&lt;P&gt;What you want is a "cartesian join", easily achieved with proc sql:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
input column1 $;
datalines;
one_1
one_2
;

data two;
input column2 $;
datalines;
two_1
two_2
two_3
;

proc sql;
create table want as
  select one.column1, two.column2
  from one, two
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Apr 2020 08:22:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-create-a-data-set-with-2-columns-and-880-rows-using/m-p/640032#M190520</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-15T08:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a data set with 2 columns and 880 rows using Arrays and Do Loops (or any method</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-create-a-data-set-with-2-columns-and-880-rows-using/m-p/640207#M190621</link>
      <description>I am so appreciative. I cannot express!</description>
      <pubDate>Wed, 15 Apr 2020 20:25:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-create-a-data-set-with-2-columns-and-880-rows-using/m-p/640207#M190621</guid>
      <dc:creator>MelissaM</dc:creator>
      <dc:date>2020-04-15T20:25:01Z</dc:date>
    </item>
  </channel>
</rss>

