<?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: Parallel Processing in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing/m-p/608438#M177079</link>
    <description>&lt;P&gt;%MACRO XML_Parse(_dir=);&lt;BR /&gt;filename dir "&amp;amp;_dir";&lt;BR /&gt;data work.dir;&lt;BR /&gt;length name $100;&lt;BR /&gt;d=dopen("dir");&lt;BR /&gt;num=dnum(d);&lt;BR /&gt;retain count 0;&lt;BR /&gt;do i=1 to num;&lt;BR /&gt;name=dread(d,i);&lt;BR /&gt;r=index(name,".xml");&lt;/P&gt;&lt;P&gt;if r ne 0 then&lt;BR /&gt;do;&lt;BR /&gt;call symput('XMLNAME'||left(i), scan(name,1,'.'));&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select count(*) INTO :_totalxml from work.dir;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%LET _totalxml=&amp;amp;_totalxml;&lt;/P&gt;&lt;P&gt;%do _XMLLOOP = 1 %TO &amp;amp;_totalxml;&lt;/P&gt;&lt;P&gt;filename xmlfile "&amp;amp;_dir.&amp;amp;_XMLNAME..xml";&lt;BR /&gt;filename mapfile "&amp;amp;_dir.&amp;amp;_XMLNAME..map";&lt;BR /&gt;libname xmlfile xmlv2 xmltype=xmlmap xmlmap=mapfile automap=replace;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;---CODE TO JOIN ALL THE TABLES USING THE ORIDIANL COLUMN TO BRING TO ONE TABLES&lt;/P&gt;&lt;P&gt;%END;&lt;/P&gt;&lt;P&gt;%MEND;&lt;BR /&gt;%XML_Parse(_dir='/ccc/ccc/cc');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code will read each of the XML file ,when first XML processing is completed it moves to the next one.&lt;/P&gt;&lt;P&gt;now my question is is there any way to run the macro in parallel so that i can read all the process all the XML file in same time&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sequential(above code)&lt;/P&gt;&lt;P&gt;XML 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Parallel( i want it in this way)&lt;/P&gt;&lt;P&gt;XML 2&amp;nbsp; &amp;nbsp;--- &amp;gt;&amp;nbsp; XML 1 XML 2 XML 3&amp;nbsp;&lt;/P&gt;&lt;P&gt;XML 3&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;though there are some document in the web ,am not able to understand clearly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Saran&lt;/P&gt;</description>
    <pubDate>Sat, 30 Nov 2019 12:09:48 GMT</pubDate>
    <dc:creator>Saranya_Sub</dc:creator>
    <dc:date>2019-11-30T12:09:48Z</dc:date>
    <item>
      <title>Parallel Processing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing/m-p/608434#M177077</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; i have around 10 XML file in a folder ,i have to loop through each of the XML and create SAS Dataset , sequentailly am doing it and the output is good.Now i have run the same macro for 10 XML file in parallel.10 sessions has to be created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;am not sure how to do the same. can any one guide me in doing that .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Saran.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 11:55:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing/m-p/608434#M177077</guid>
      <dc:creator>Saranya_Sub</dc:creator>
      <dc:date>2019-11-30T11:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel Processing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing/m-p/608435#M177078</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/40895"&gt;@Saranya_Sub&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please show your code so that we can help you?&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 11:58:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing/m-p/608435#M177078</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2019-11-30T11:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel Processing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing/m-p/608438#M177079</link>
      <description>&lt;P&gt;%MACRO XML_Parse(_dir=);&lt;BR /&gt;filename dir "&amp;amp;_dir";&lt;BR /&gt;data work.dir;&lt;BR /&gt;length name $100;&lt;BR /&gt;d=dopen("dir");&lt;BR /&gt;num=dnum(d);&lt;BR /&gt;retain count 0;&lt;BR /&gt;do i=1 to num;&lt;BR /&gt;name=dread(d,i);&lt;BR /&gt;r=index(name,".xml");&lt;/P&gt;&lt;P&gt;if r ne 0 then&lt;BR /&gt;do;&lt;BR /&gt;call symput('XMLNAME'||left(i), scan(name,1,'.'));&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;select count(*) INTO :_totalxml from work.dir;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%LET _totalxml=&amp;amp;_totalxml;&lt;/P&gt;&lt;P&gt;%do _XMLLOOP = 1 %TO &amp;amp;_totalxml;&lt;/P&gt;&lt;P&gt;filename xmlfile "&amp;amp;_dir.&amp;amp;_XMLNAME..xml";&lt;BR /&gt;filename mapfile "&amp;amp;_dir.&amp;amp;_XMLNAME..map";&lt;BR /&gt;libname xmlfile xmlv2 xmltype=xmlmap xmlmap=mapfile automap=replace;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;---CODE TO JOIN ALL THE TABLES USING THE ORIDIANL COLUMN TO BRING TO ONE TABLES&lt;/P&gt;&lt;P&gt;%END;&lt;/P&gt;&lt;P&gt;%MEND;&lt;BR /&gt;%XML_Parse(_dir='/ccc/ccc/cc');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code will read each of the XML file ,when first XML processing is completed it moves to the next one.&lt;/P&gt;&lt;P&gt;now my question is is there any way to run the macro in parallel so that i can read all the process all the XML file in same time&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sequential(above code)&lt;/P&gt;&lt;P&gt;XML 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Parallel( i want it in this way)&lt;/P&gt;&lt;P&gt;XML 2&amp;nbsp; &amp;nbsp;--- &amp;gt;&amp;nbsp; XML 1 XML 2 XML 3&amp;nbsp;&lt;/P&gt;&lt;P&gt;XML 3&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;though there are some document in the web ,am not able to understand clearly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Saran&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 12:09:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing/m-p/608438#M177079</guid>
      <dc:creator>Saranya_Sub</dc:creator>
      <dc:date>2019-11-30T12:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel Processing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing/m-p/608450#M177082</link>
      <description>&lt;P&gt;Take a look to see if anything in this thread solves your problem:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/Macros-and-Parallel-processing/td-p/430028" target="_blank"&gt;https://communities.sas.com/t5/General-SAS-Programming/Macros-and-Parallel-processing/td-p/430028&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-unison&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 15:45:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing/m-p/608450#M177082</guid>
      <dc:creator>unison</dc:creator>
      <dc:date>2019-11-30T15:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel Processing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing/m-p/608469#M177091</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/40895"&gt;@Saranya_Sub&lt;/a&gt;,&lt;/P&gt;&lt;DIV class="gmail_default"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="gmail_default"&gt;let me share this little&amp;nbsp;step-by-step "quasi" tutorial+macro for parallel processing in SAS I did some time ago (in advance I apologise for any spelling/grammar issues :-). Maybe you will find it useful.&lt;/DIV&gt;&lt;DIV class="gmail_default"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="gmail_default"&gt;&lt;A href="http://www.mini.pw.edu.pl/~bjablons/SASpublic/Parallel-processing-in-BASE-SAS.sas" target="_blank"&gt;http://www.mini.pw.edu.pl/~bjablons/SASpublic/Parallel-processing-in-BASE-SAS.sas&lt;/A&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="gmail_default"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="gmail_default"&gt;All the best&lt;/DIV&gt;&lt;DIV class="gmail_default"&gt;Bart&lt;/DIV&gt;</description>
      <pubDate>Sat, 30 Nov 2019 18:21:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing/m-p/608469#M177091</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2019-11-30T18:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel Processing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing/m-p/608523#M177111</link>
      <description>&lt;P&gt;In my experience using SAS/CONNECT is the easiest and most reliable way to do this within SAS code. If you don't have this product then that rules out this option.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2019 00:53:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-Processing/m-p/608523#M177111</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-12-01T00:53:29Z</dc:date>
    </item>
  </channel>
</rss>

