<?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: split dataset and export into multiple files in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/418501#M19949</link>
    <description>&lt;P&gt;You can use next step to split dataset as you want - just addapt number of datasets to gather into one output dataset:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input shipment $;
cards;
a
a
a
b
b
c
d
d
d
e
;
run;
%let gather=2; /* number of shipments per dataset */
proc sort data=have; by shipment; run;
data temp;
 set have end=eof;
  by shipment;
     retain dsno 0   /* split dataset number */
            ship ;   /* shipping sequence    */
     if first.shipment then do;
        ship+1;
        if mod(ship, &amp;amp;gather) = 1 then dsno+1;
     end; 
     if eof then do;
        put ship= dsno=;
        call symput('maxship',strip(dsno));
     end;
run;
     
%macro split;
  %do i=1 %to &amp;amp;maxship.;
     data dsn_&amp;amp;i;
      set temp (where=(dsno = &amp;amp;i));
     run;
  %end;
%mend;
%split;
 &lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 05 Dec 2017 15:24:01 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2017-12-05T15:24:01Z</dc:date>
    <item>
      <title>split dataset and export into multiple files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/418452#M19947</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset which has shipment data, where a shipment can exist in multiple rows with additional data (such as return info, etc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dataset has 10000 shipments, the row count is &lt;STRONG&gt;more&lt;/STRONG&gt;, but remains &lt;U&gt;irrelevant&lt;/U&gt;, coz&amp;nbsp;I need to split this dataset into splits of 100 &lt;STRONG&gt;shipments&lt;/STRONG&gt; (column 2) and export these splits into xml files using ODS..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Dataset sample :&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Rowcount&lt;/U&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;U&gt;Shipment&lt;/U&gt;&amp;nbsp;&amp;nbsp; &lt;U&gt;Shipmentdeatails1&lt;/U&gt;&amp;nbsp; &lt;U&gt;Shipmentdetails2&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;y&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;y&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;y&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;y&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;y&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;6&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;y&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so in the above case, the first two rows are 1 shipment of 'a', and the row 5 is a single row and is&amp;nbsp;the shipment 'c'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone please help me out with a&amp;nbsp;code for this function.. thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 12:21:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/418452#M19947</guid>
      <dc:creator>Kran</dc:creator>
      <dc:date>2017-12-05T12:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: split dataset and export into multiple files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/418480#M19948</link>
      <description>&lt;P&gt;Something like - and not tested as not typing in the test data - provide test data in the form of a datastep in future:&lt;/P&gt;
&lt;PRE&gt;proc sort data=have out=loop nodupkey;
  by shipment;
run;

data _null_;
  set loop;
  retain fno 0;
  if _n_=1 or mod(_n_,100)=0 then do;&lt;BR /&gt;    if _n_ &amp;gt; 1 then call execute('); run;');
    fno=fno+1;
    call execute(cats('data want',put(fno,best.),'; set have; where shipment in (',quote(shipment)));
  end;&lt;BR /&gt;  else call execute(' '||quote(strip(shipment)));
run;&lt;/PRE&gt;
&lt;P&gt;This shows how to split a dataset out into lots of datasets called wantX - X being incremental.&amp;nbsp; You could do something similar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 14:13:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/418480#M19948</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-12-05T14:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: split dataset and export into multiple files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/418501#M19949</link>
      <description>&lt;P&gt;You can use next step to split dataset as you want - just addapt number of datasets to gather into one output dataset:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input shipment $;
cards;
a
a
a
b
b
c
d
d
d
e
;
run;
%let gather=2; /* number of shipments per dataset */
proc sort data=have; by shipment; run;
data temp;
 set have end=eof;
  by shipment;
     retain dsno 0   /* split dataset number */
            ship ;   /* shipping sequence    */
     if first.shipment then do;
        ship+1;
        if mod(ship, &amp;amp;gather) = 1 then dsno+1;
     end; 
     if eof then do;
        put ship= dsno=;
        call symput('maxship',strip(dsno));
     end;
run;
     
%macro split;
  %do i=1 %to &amp;amp;maxship.;
     data dsn_&amp;amp;i;
      set temp (where=(dsno = &amp;amp;i));
     run;
  %end;
%mend;
%split;
 &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Dec 2017 15:24:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/418501#M19949</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-12-05T15:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: split dataset and export into multiple files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/418818#M19959</link>
      <description>&lt;P&gt;thanks so much for your help! I was able to split it well to batch1, batch2.... so on &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;so now..&amp;nbsp;is there a way to link the splits to a&amp;nbsp;proc template program I've written to export? (..to xml in a certain hierarchy)&lt;/P&gt;&lt;P&gt;so as to get batch1.xml..batch2..etc&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 15:18:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/418818#M19959</guid>
      <dc:creator>Kran</dc:creator>
      <dc:date>2017-12-06T15:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: split dataset and export into multiple files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/418834#M19961</link>
      <description>&lt;P&gt;You can combine the proc template into the macro as new step just after creating the splitted dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post an example of your proc template, dealing with one dataset as an example,&lt;/P&gt;
&lt;P&gt;something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro split;
  %do i=1 %to &amp;amp;maxship.;
     data dsn_&amp;amp;i;
      set temp (where=(dsno = &amp;amp;i));
     run;

    /* add here the proc template dealing with one dataset: dsn_&amp;amp;i */

  %end;
%mend;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Dec 2017 15:43:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/418834#M19961</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-12-06T15:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: split dataset and export into multiple files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/419105#M19967</link>
      <description>&lt;P&gt;Hi Shmuel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ok so then&amp;nbsp;a simplified version of the proc template program goes like this for a single dataset&amp;nbsp;named 'set0001'&amp;nbsp;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;ods&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;path&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(prepend) work.templat(update);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; margin: 0px; color: navy; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;proc&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN style="background: white; margin: 0px; color: navy; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;template&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: green; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;/*tagset defined and named as xmlexport*/&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;define&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;tagset&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; tagsets.xmlexport /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;store&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;=work.templat; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;define&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;event&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; doc;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size="3"&gt;start:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: green; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;/*put required declarations in xml*/&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;?xml version=""1.0"""&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;putq&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;" encoding="&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; encoding;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;" ?&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;!--xml file to input the services data for price calculation--&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;shipments&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;header&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;sourceref&amp;gt;x0203p&amp;lt;/sourceref&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size="3"&gt;p&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;ut&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;/header&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;eval&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; $counter &lt;/FONT&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; margin: 0px; color: teal; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;0&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;eval&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; $currentvalue &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"1"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;eval&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; $previousvalue &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"2"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;eval&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; $currentpk &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"3"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;eval&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; $previouspk &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"4"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size="3"&gt;finish:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;/pack&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;/shipment&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;/shipments&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;end&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: green; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;/*execution of the event 'data' performed for each row*/&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;define&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;event&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; row;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size="3"&gt;start:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;trigger&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; data /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(section,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"body"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;);&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;end&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: green; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;/*step execution of columns within the main body of available data*/&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;define&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;event&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; data;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;FONT size="3"&gt;start:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;set&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; $currentvalue value /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"shipnumber"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;do&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; ^&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;($currentvalue, $previousvalue);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;/pack&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; (&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;" shipnumber "&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;) and ^&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;($previousvalue, &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"2"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;));&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;/shipment&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; (&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;" shipnumber "&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;) and ^&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;($previousvalue, &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"2"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;));&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;shipment&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;" shipnumber "&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt; shipnumber &amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; value /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;" shipnumber "&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;/ shipnumber &amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;" shipnumber "&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;eval&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; $currentpk &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"3"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;eval&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; $previouspk &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"4"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;done&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;set&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; $currentpk value /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"pack"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;do&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; (&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;($currentvalue, $previousvalue) and ^&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;($currentpk, $ previouspk)) or (^&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;($currentvalue, $previousvalue));&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;/ pack &amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; (&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;" pack "&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;)and &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;($currentvalue, $previousvalue));&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt; pack &amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;" pack "&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;packnumber&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; value /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;" pack "&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;/packnumber&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;" pack "&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;volume&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; value /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"volume"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;/volume&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"volume"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;weight&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; value /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"weight"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;put&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"&amp;lt;/weight&amp;gt;"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"weight"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;done&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;set&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; $previousitem $currentitem /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;"weight"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;set&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt; $previousvalue $currentvalue /&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;if&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;cmp&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;(name,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;" weight "&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;);&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;end&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;end&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; margin: 0px; color: navy; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;run&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; margin: 0px; color: navy; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;ods&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;markup&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;type&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;=xmlexport &lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;file&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;=&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: purple; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;'/shared/data/test_ods.xml'&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;SPAN&gt;&lt;FONT size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; margin: 0px; color: navy; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;proc&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN style="background: white; margin: 0px; color: navy; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;print&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;data&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;=work.set0001;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; margin: 0px; color: navy; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;run&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;ods&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;markup&lt;/FONT&gt;&lt;/SPAN&gt; &lt;SPAN style="background: white; margin: 0px; color: blue; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;close&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; margin: 0px; color: black; font-family: 'Courier New';"&gt;&lt;FONT size="3"&gt;;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 09:44:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/419105#M19967</guid>
      <dc:creator>Kran</dc:creator>
      <dc:date>2017-12-07T09:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: split dataset and export into multiple files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/419160#M19968</link>
      <description>&lt;P&gt;I'm not familiar with proc template, but if&amp;nbsp; -&amp;nbsp;&lt;STRONG&gt;&amp;nbsp;&lt;FONT size="3"&gt;proc&lt;/FONT&gt;&amp;nbsp;&lt;FONT size="3"&gt;print&lt;/FONT&gt;&amp;nbsp;&lt;FONT size="3"&gt;data&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT size="3"&gt;&lt;STRONG&gt;=work.set0001;&lt;/STRONG&gt;&amp;nbsp; - is the only line to change&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;then replace the &lt;STRONG&gt;work.set0001&lt;/STRONG&gt; with&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;work.dsn_&amp;amp;i&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;You should consider:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;&amp;nbsp;- are there other lines or arguments addapted specifically to set0001 ?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;If yes then you need add those arguments, somehow, to the macro,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;otherwise just copy the whole code inside the macro - as I posted before - with the above change.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;If need, you can add the export code following the proc template code inside the macro.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;If possible just try it and check results.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 12:33:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/419160#M19968</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-12-07T12:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: split dataset and export into multiple files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/419162#M19969</link>
      <description>&lt;P&gt;hi Shmuel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;no all the splits of the dataset would have identical structures and column names&amp;nbsp;etc..so no adaptation issue..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and while I could replace the data=&lt;STRONG&gt;work.set0001&lt;/STRONG&gt; with&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;work.dsn_&amp;amp;i&lt;/STRONG&gt;....but what about the xml file naming..?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 13:31:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/419162#M19969</guid>
      <dc:creator>Kran</dc:creator>
      <dc:date>2017-12-07T13:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: split dataset and export into multiple files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/419185#M19970</link>
      <description>&lt;P&gt;AS I said, I'm not familiar with proc template but if you point at the line or lines where is the xml file name&lt;/P&gt;
&lt;P&gt;then you can:&lt;/P&gt;
&lt;P&gt;- either change the xml file name to&lt;STRONG&gt; &amp;lt;prefix&amp;gt;_&amp;amp;i&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- or write each file in a separate subfolder:&amp;nbsp; &lt;STRONG&gt;&amp;lt;path&amp;gt;_&amp;amp;i./&amp;lt;xml-filename&amp;gt;&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;(use / in linux or \ in windows)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; which may need create the subfolders in advance - maybe programatically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just guessing - is next line containing the xml file name and is it the only one ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods markup type=xmlexport file='/shared/data/test_ods.xml'; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;if it is - change to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods markup type=xmlexport file="/shared/data/test_ods_&amp;amp;i.xml"; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;pay attention - I changed the &lt;STRONG&gt;single&lt;/STRONG&gt; quotes into &lt;STRONG&gt;double&lt;/STRONG&gt; quotes - in order that &lt;STRONG&gt;&amp;amp;i&lt;/STRONG&gt; will be resolved.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 14:34:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/split-dataset-and-export-into-multiple-files/m-p/419185#M19970</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-12-07T14:34:18Z</dc:date>
    </item>
  </channel>
</rss>

