<?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 Optmodel create data with multiple key-column and different columns in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Optmodel-create-data-with-multiple-key-column-and-different/m-p/273765#M58469</link>
    <description>&lt;P&gt;I have a vector X which from 3 sets [Origin, Destination, Product] has a value, and i want to create a table that has as key columns Origin and destination and then for every product a column saying how much to transport.&lt;/P&gt;&lt;P&gt;So something like:&lt;/P&gt;&lt;P&gt;Origin Dest. ProductA ProductB...&lt;/P&gt;&lt;P&gt;A.........AB.......10......0&lt;/P&gt;&lt;P&gt;A.........AC.......5.......4&lt;/P&gt;&lt;P&gt;I'm trying something like this, in optmodel:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;create data Ctrl3.Transport
    from  [Origin Destination] = {FAB, CITIES}
    {k in PRODUCT} &amp;lt;col('Product_'||k) = X[Origin, Destination, k]&amp;gt;; run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have another one with 4 variables that doesn't work. Sas doesn't seem to like it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But sas doesn't seem to like it&lt;/P&gt;</description>
    <pubDate>Sat, 28 May 2016 15:01:29 GMT</pubDate>
    <dc:creator>BenjiP</dc:creator>
    <dc:date>2016-05-28T15:01:29Z</dc:date>
    <item>
      <title>Optmodel create data with multiple key-column and different columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Optmodel-create-data-with-multiple-key-column-and-different/m-p/273765#M58469</link>
      <description>&lt;P&gt;I have a vector X which from 3 sets [Origin, Destination, Product] has a value, and i want to create a table that has as key columns Origin and destination and then for every product a column saying how much to transport.&lt;/P&gt;&lt;P&gt;So something like:&lt;/P&gt;&lt;P&gt;Origin Dest. ProductA ProductB...&lt;/P&gt;&lt;P&gt;A.........AB.......10......0&lt;/P&gt;&lt;P&gt;A.........AC.......5.......4&lt;/P&gt;&lt;P&gt;I'm trying something like this, in optmodel:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;create data Ctrl3.Transport
    from  [Origin Destination] = {FAB, CITIES}
    {k in PRODUCT} &amp;lt;col('Product_'||k) = X[Origin, Destination, k]&amp;gt;; run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have another one with 4 variables that doesn't work. Sas doesn't seem to like it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But sas doesn't seem to like it&lt;/P&gt;</description>
      <pubDate>Sat, 28 May 2016 15:01:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Optmodel-create-data-with-multiple-key-column-and-different/m-p/273765#M58469</guid>
      <dc:creator>BenjiP</dc:creator>
      <dc:date>2016-05-28T15:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Optmodel create data with multiple key-column and different columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Optmodel-create-data-with-multiple-key-column-and-different/m-p/274206#M58490</link>
      <description>&lt;P&gt;You should post details of the project that doesn't work; the code and the log with any error or warning messages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It may also be that the proposed problem has no feasible solutions.&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 20:48:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Optmodel-create-data-with-multiple-key-column-and-different/m-p/274206#M58490</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-05-31T20:48:34Z</dc:date>
    </item>
  </channel>
</rss>

