<?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 Nested Loop and splitting in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Nested-Loop-and-splitting/m-p/434071#M28046</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi SAS Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;i have data set and i want to split three variable and run nested loop of three and generate new data set. i am from java background so it is very difficult for me to do this. please can you help to provide hint or solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is Required Data set&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data company_data;&lt;BR /&gt;infile datalines dsd;&lt;BR /&gt;input $warehouse factory $ store $ product $ address $;&lt;BR /&gt;datalines;&lt;BR /&gt;"11,22","24,27","12,23","ABC"&lt;BR /&gt;"1,2,3","6,7","3,2","CDE"&lt;BR /&gt;"72,73","10,20,30,24","4,5,6,7","IJK"&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="company.PNG" style="width: 404px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18319i5C0448EB9511491F/image-size/large?v=v2&amp;amp;px=999" role="button" title="company.PNG" alt="company.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Required Result&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="result.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18320i4B94AD56C81EE809/image-size/large?v=v2&amp;amp;px=999" role="button" title="result.PNG" alt="result.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i wan to generate all possible combination of factory, store and product and i have tried but it is not useful show code here because it is not working properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Feb 2018 07:02:01 GMT</pubDate>
    <dc:creator>rsathe</dc:creator>
    <dc:date>2018-02-05T07:02:01Z</dc:date>
    <item>
      <title>Nested Loop and splitting</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Nested-Loop-and-splitting/m-p/434071#M28046</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi SAS Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;i have data set and i want to split three variable and run nested loop of three and generate new data set. i am from java background so it is very difficult for me to do this. please can you help to provide hint or solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is Required Data set&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data company_data;&lt;BR /&gt;infile datalines dsd;&lt;BR /&gt;input $warehouse factory $ store $ product $ address $;&lt;BR /&gt;datalines;&lt;BR /&gt;"11,22","24,27","12,23","ABC"&lt;BR /&gt;"1,2,3","6,7","3,2","CDE"&lt;BR /&gt;"72,73","10,20,30,24","4,5,6,7","IJK"&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="company.PNG" style="width: 404px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18319i5C0448EB9511491F/image-size/large?v=v2&amp;amp;px=999" role="button" title="company.PNG" alt="company.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Required Result&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="result.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18320i4B94AD56C81EE809/image-size/large?v=v2&amp;amp;px=999" role="button" title="result.PNG" alt="result.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i wan to generate all possible combination of factory, store and product and i have tried but it is not useful show code here because it is not working properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 07:02:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Nested-Loop-and-splitting/m-p/434071#M28046</guid>
      <dc:creator>rsathe</dc:creator>
      <dc:date>2018-02-05T07:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: Nested Loop and splitting</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Nested-Loop-and-splitting/m-p/434083#M28047</link>
      <description>&lt;P&gt;Three nested it is &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data out;&lt;BR /&gt;&amp;nbsp; set company_data;&lt;BR /&gt;&amp;nbsp; length fac sto pro $3;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp; i1 = 1;&lt;BR /&gt;&amp;nbsp; fac = scan(factory,i1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; do while (fac ne '');&lt;BR /&gt;&amp;nbsp; &amp;nbsp; i2 = 1;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; sto = scan(store,i2);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; do while (sto ne '');&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; i3 = 1;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; pro = scan(product,i3);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; do while (pro ne '');&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i3 + 1;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pro = scan(product,i3);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; i2 + 1;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; sto = scan(store,i2);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; i1 + 1;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; fac = scan(factory,i1);&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;//Fredrik&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2018 07:58:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Nested-Loop-and-splitting/m-p/434083#M28047</guid>
      <dc:creator>FredrikE</dc:creator>
      <dc:date>2018-02-05T07:58:46Z</dc:date>
    </item>
  </channel>
</rss>

