<?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 QUANTITY AND CALCULATE  BALANCE AND CASE PACK in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565443#M158756</link>
    <description>&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;QTY&lt;/TD&gt;&lt;TD&gt;CASE PACK&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Day 1&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Day 2&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DAY 3&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DAY 4&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DAY 5&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;OUTPUT&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Remaining qty&lt;/TD&gt;&lt;TD&gt;CASE PACK QTY&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;18&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The quantities(QTY) are&amp;nbsp; sent to customer regularly. But I would like to send these quantities in case pack (6 PCS) based on the quantity column.&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;/P&gt;&lt;P&gt;For example, First day customer needs 14 pcs but we should send 18 pcs based on case pack qty (6*3=18) which is greater than customer request . &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;/P&gt;&lt;P&gt;So, the customer will use 14 out of 18 then the remaining qty in customer's hand is 4 pcs.Customer has 4 pcs end of the day 1.&lt;/P&gt;&lt;P&gt;In day 2 customer needs 12 pcs so we need to send as much case pack of 6 units&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; So, in day 2 the minimum we should send&amp;nbsp; &amp;nbsp;12 pcs but customer already has 4 pcs . After 12 pcs is sent to the customer, so the customer will have 16 on day 2 but the customer spends 12 out of 16 then the remaining quantity is 4 pcs.&lt;/P&gt;&lt;P&gt;Day 3, The customer has 4 pcs and he needs only 3 pcs so he used 3 out of 4 and then he has 1 pcs at the end of day 3.&lt;/P&gt;&lt;P&gt;Day 4, he has 1 pc and he needs 1 pc so we don’t have to send any case pack. Day 5, he needs 3 pc but he does not have any quantity so we need to send&amp;nbsp; 6 pcs (1 case pack).&amp;nbsp; He will use 3 pcs out of 6 then the remaining qty will be 3. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you please help me to resolve this problem? How to create sas code for the output?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jun 2019 23:55:11 GMT</pubDate>
    <dc:creator>niloya</dc:creator>
    <dc:date>2019-06-11T23:55:11Z</dc:date>
    <item>
      <title>QUANTITY AND CALCULATE  BALANCE AND CASE PACK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565443#M158756</link>
      <description>&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;QTY&lt;/TD&gt;&lt;TD&gt;CASE PACK&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Day 1&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Day 2&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DAY 3&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DAY 4&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DAY 5&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;OUTPUT&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Remaining qty&lt;/TD&gt;&lt;TD&gt;CASE PACK QTY&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;18&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The quantities(QTY) are&amp;nbsp; sent to customer regularly. But I would like to send these quantities in case pack (6 PCS) based on the quantity column.&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;/P&gt;&lt;P&gt;For example, First day customer needs 14 pcs but we should send 18 pcs based on case pack qty (6*3=18) which is greater than customer request . &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;/P&gt;&lt;P&gt;So, the customer will use 14 out of 18 then the remaining qty in customer's hand is 4 pcs.Customer has 4 pcs end of the day 1.&lt;/P&gt;&lt;P&gt;In day 2 customer needs 12 pcs so we need to send as much case pack of 6 units&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; So, in day 2 the minimum we should send&amp;nbsp; &amp;nbsp;12 pcs but customer already has 4 pcs . After 12 pcs is sent to the customer, so the customer will have 16 on day 2 but the customer spends 12 out of 16 then the remaining quantity is 4 pcs.&lt;/P&gt;&lt;P&gt;Day 3, The customer has 4 pcs and he needs only 3 pcs so he used 3 out of 4 and then he has 1 pcs at the end of day 3.&lt;/P&gt;&lt;P&gt;Day 4, he has 1 pc and he needs 1 pc so we don’t have to send any case pack. Day 5, he needs 3 pc but he does not have any quantity so we need to send&amp;nbsp; 6 pcs (1 case pack).&amp;nbsp; He will use 3 pcs out of 6 then the remaining qty will be 3. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you please help me to resolve this problem? How to create sas code for the output?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 23:55:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565443#M158756</guid>
      <dc:creator>niloya</dc:creator>
      <dc:date>2019-06-11T23:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: QUANTITY AND CALCULATE  BALANCE AND CASE PACK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565445#M158758</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/266639"&gt;@niloya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
input day $	QTY	CASEPACK ;
cards;
Day1	14	6
Day2	12	6
DAY3	3	6
DAY4	1	6
DAY5	3	6
;

data want ;
set have; 
k=ceil((qty-remaining)/casepack);
CASEPACKQTY=k*casepack;
remaining + CASEPACKQTY-qty;
drop k;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jun 2019 00:46:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565445#M158758</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-06-12T00:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: QUANTITY AND CALCULATE  BALANCE AND CASE PACK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565453#M158763</link>
      <description>&lt;P&gt;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205" target="_self"&gt;&lt;SPAN class="login-bold"&gt;@novinosrin&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;Thank you for your reply. How did you find remaining qty? I need to find remaining qty as well.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 02:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565453#M158763</guid>
      <dc:creator>niloya</dc:creator>
      <dc:date>2019-06-12T02:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: QUANTITY AND CALCULATE  BALANCE AND CASE PACK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565456#M158766</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class="login-bold"&gt;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205" target="_self"&gt;@novinosrin&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;Thanks again for your reply .&amp;nbsp; tried the code you sent but it does not work. I need the number of number of case pack and remaining qty together.&amp;nbsp; do you think is there any other method to find them?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 02:26:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565456#M158766</guid>
      <dc:creator>niloya</dc:creator>
      <dc:date>2019-06-12T02:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: QUANTITY AND CALCULATE  BALANCE AND CASE PACK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565457#M158767</link>
      <description>&lt;P&gt;Please&lt;U&gt; read, understand, execute, review the code, output thoroughly&lt;/U&gt; and let us know your questions.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 02:34:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565457#M158767</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-06-12T02:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: QUANTITY AND CALCULATE  BALANCE AND CASE PACK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565458#M158768</link>
      <description>Hi&lt;BR /&gt;k=ceil((qty-remaining)/casepack);&lt;BR /&gt;CASEPACKQTY=k*casepack;&lt;BR /&gt;remaining + CASEPACKQTY-qty;&lt;BR /&gt;drop k;&lt;BR /&gt;&lt;BR /&gt;I applied that code. Since i dont have remaining input in your code steps, the code did not work. When apply the code steps you recommend , it returns missing data. I think all your calculation depends on remaining input but this also is required to get sas steps to find&lt;BR /&gt;My inputs are&lt;BR /&gt;Input output&lt;BR /&gt;QTY CASE PACK&lt;BR /&gt;Day 1 14 6&lt;BR /&gt;Day 2 12 6&lt;BR /&gt;DAY 3 3 6&lt;BR /&gt;DAY 4 1 6&lt;BR /&gt;DAY 5 3 6&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Jun 2019 02:41:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565458#M158768</guid>
      <dc:creator>niloya</dc:creator>
      <dc:date>2019-06-12T02:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: QUANTITY AND CALCULATE  BALANCE AND CASE PACK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565462#M158769</link>
      <description>&lt;P&gt;Your stated expected output:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/266639"&gt;@niloya&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;OUTPUT&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Remaining qty&lt;/TD&gt;
&lt;TD&gt;CASE PACK QTY&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;TD&gt;18&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;TD&gt;12&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-06-11 at 9.18.29 PM.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30236iC8ECC13633732800/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-06-11 at 9.18.29 PM.png" alt="Screen Shot 2019-06-11 at 9.18.29 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The variables Remaining and CasePackQTY are matching to what you expected. The input is exactly as you've specified, no additional data is used, I ran the program from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp; as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm assuming you changed the code to refer to your data set? If it doesn't work, please explicitly explain how it does not work and what your expected output is for the new data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Most likely you forgot to include a use case or didn't change the code correctly to account for your data set or variable names.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please include the code used if you're still having issues.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 03:24:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565462#M158769</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-12T03:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: QUANTITY AND CALCULATE  BALANCE AND CASE PACK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565463#M158770</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&lt;BR /&gt;You are the best ever &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I am really sorry that i was skipping the parenthesis right next to ceil formulation. That is why i have not found the result. You did a perfect job Thank you so much</description>
      <pubDate>Wed, 12 Jun 2019 04:02:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565463#M158770</guid>
      <dc:creator>niloya</dc:creator>
      <dc:date>2019-06-12T04:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: QUANTITY AND CALCULATE  BALANCE AND CASE PACK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565464#M158771</link>
      <description>&lt;P&gt;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879" target="_self"&gt;&lt;SPAN class="login-bold"&gt;@Reeza &lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="login-bold"&gt;Thank you so much helping me to figure out my mistake:)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 04:07:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565464#M158771</guid>
      <dc:creator>niloya</dc:creator>
      <dc:date>2019-06-12T04:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: QUANTITY AND CALCULATE  BALANCE AND CASE PACK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565540#M158803</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205" target="_blank" rel="noopener"&gt;@novinosrin&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your replies. I have a quick question. I really appreciate your help.&amp;nbsp; I need your help again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to run this code for too many different items separately. If i add the items as a big list like that below, how sas codes changes?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much again.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have ;&lt;BR /&gt;input day $ item $ qty casepack;&lt;BR /&gt;cards;&lt;BR /&gt;day1&amp;nbsp; a 1 6&lt;BR /&gt;day2&amp;nbsp; a 1 6&lt;BR /&gt;day3&amp;nbsp; a 1 6&lt;BR /&gt;day4&amp;nbsp; a 1 6&lt;BR /&gt;day5&amp;nbsp; a 1 6&lt;BR /&gt;day1&amp;nbsp; b 1 5&lt;BR /&gt;day2&amp;nbsp; b 2 5&lt;BR /&gt;day3&amp;nbsp; b 4 5&lt;BR /&gt;day1&amp;nbsp; c 3 4&lt;BR /&gt;day2&amp;nbsp; c 4 4&lt;BR /&gt;day3&amp;nbsp; c 2 4&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;by item;&lt;BR /&gt;k=ceil((qty-remaining)/casepack);&lt;BR /&gt;casepackqty=k*casepack;&lt;BR /&gt;remaining+casepackqty-qty;&lt;BR /&gt;drop k;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 13:00:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565540#M158803</guid>
      <dc:creator>niloya</dc:creator>
      <dc:date>2019-06-12T13:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: QUANTITY AND CALCULATE  BALANCE AND CASE PACK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565544#M158805</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;by item;
if first.item then remaining=0;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jun 2019 13:04:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565544#M158805</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-06-12T13:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: QUANTITY AND CALCULATE  BALANCE AND CASE PACK</title>
      <link>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565545#M158806</link>
      <description>Thank you so much . You are the life saver. Million times thank you. It is working:)</description>
      <pubDate>Wed, 12 Jun 2019 13:14:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/QUANTITY-AND-CALCULATE-BALANCE-AND-CASE-PACK/m-p/565545#M158806</guid>
      <dc:creator>niloya</dc:creator>
      <dc:date>2019-06-12T13:14:25Z</dc:date>
    </item>
  </channel>
</rss>

