<?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: Ceate a Do Loop? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Ceate-a-Do-Loop/m-p/856295#M338343</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro doloop;
    %do i=1 to 6;
        %LotNum(Pathgendt&amp;amp;i,Pathgentype&amp;amp;i,Pathgenlot&amp;amp;i)
     %end;
%mend;
%doloop&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 30 Jan 2023 17:57:30 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-01-30T17:57:30Z</dc:date>
    <item>
      <title>Ceate a Do Loop?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ceate-a-Do-Loop/m-p/856294#M338342</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm curious if I could create a do loop (1-6) in the following programming.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro LotNum(sourcedate,sourcetype,sourceLogN);
%let i=(&amp;amp;rr + 1);
%let rr=%eval(&amp;amp;i);
proc sql;
create table Pathgen&amp;amp;rr as
select site,id,&amp;amp;sourcetype,&amp;amp;sourcedate,&amp;amp;sourceLogN
from Pathgen
where &amp;amp;sourcedate. ^=. and &amp;amp;sourcedate. ^= '08aug8888'd and &amp;amp;sourcetype. in (1,2,3) and sourceLogN = ''
order by site,id;

%let Pathgen_&amp;amp;rr=%str(LotNumumber are blank);

ods proclabel "check &amp;amp;rr:&amp;amp;&amp;amp;&amp;amp;Pathgen_&amp;amp;rr";

data Pathgen&amp;amp;rr;
length var1 $250;
set Pathgen&amp;amp;rr;
var1="&amp;amp;sourcedate.="||trim(left(put(&amp;amp;sourcedate.,mmddyy10.)))||','||
	 "&amp;amp;sourcetype.="||trim(left(put(&amp;amp;sourcetype.,3.)))||','||
	 "&amp;amp;sourceLogN.="||trim(left(put(&amp;amp;sourceLogN.,$10.)));
run;

%createPathgen;
%mend LotNum;
%LotNum(Pathgendt1,Pathgentype1,Pathgenlot1);
%LotNum(Pathgendt2,Pathgentype2,Pathgenlot2);
%LotNum(Pathgendt3,Pathgentype3,Pathgenlot3);
%LotNum(Pathgendt4,Pathgentype4,Pathgenlot4);
%LotNum(Pathgendt5,Pathgentype5,Pathgenlot5);
%LotNum(Pathgendt6,Pathgentype6,Pathgenlot6);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jan 2023 17:48:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ceate-a-Do-Loop/m-p/856294#M338342</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2023-01-30T17:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Ceate a Do Loop?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ceate-a-Do-Loop/m-p/856295#M338343</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro doloop;
    %do i=1 to 6;
        %LotNum(Pathgendt&amp;amp;i,Pathgentype&amp;amp;i,Pathgenlot&amp;amp;i)
     %end;
%mend;
%doloop&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jan 2023 17:57:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ceate-a-Do-Loop/m-p/856295#M338343</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-01-30T17:57:30Z</dc:date>
    </item>
  </channel>
</rss>

