<?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>PGStats Tracker</title>
    <link>https://communities.sas.com/kntur85557/tracker</link>
    <description>PGStats Tracker</description>
    <pubDate>Wed, 06 May 2026 18:09:30 GMT</pubDate>
    <dc:date>2026-05-06T18:09:30Z</dc:date>
    <item>
      <title>Re: Randomly select  3 rows with condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Randomly-select-3-rows-with-condition/m-p/917738#M361517</link>
      <description>&lt;P&gt;"samplingunit"&amp;nbsp; and "&lt;CODE class="  language-sas"&gt;cluster"&lt;/CODE&gt; are synonyms, see the &lt;A href="https://documentation.sas.com/doc/en/statug/15.2/statug_surveyselect_syntax05.htm" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;. &lt;/P&gt;</description>
      <pubDate>Sat, 24 Feb 2024 20:46:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Randomly-select-3-rows-with-condition/m-p/917738#M361517</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2024-02-24T20:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Randomly select  3 rows with condition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Randomly-select-3-rows-with-condition/m-p/916643#M361027</link>
      <description>&lt;P&gt;Or equivalently,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyselect data=have out=temp seed=123 sampsize=3 noprint;
samplingunit dept_no;
proc surveyselect data=temp out=want seed=123 sampsize=1 noprint;
strata dept_no;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note: May be a bit faster if you have more distinct depts than emp by dept.&lt;/P&gt;
&lt;P&gt;Note: Sorting is implied in the first selection step.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Feb 2024 22:26:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Randomly-select-3-rows-with-condition/m-p/916643#M361027</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2024-02-17T22:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Requête inner join conditional</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Requ%C3%AAte-inner-join-conditional/m-p/916642#M361026</link>
      <description>&lt;P&gt;Si j'ai bien compris le problème, il faudrait remplacer les jointures internes par des jointures externes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select
	pop.pop_id, pop.date, ... ,
	pop.geo_id, 
	coalesce(jur.var1, geo.var1) as var1,
	coalesce(jur.var2, geo.var2) as var2, ...
from
	pop 
		left join jur on pop.pop_id=jur.id and pop.date=jur.date and ...
		left join geo on pop.geo_id=geo.id and pop.date=geo.date and ...;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 17 Feb 2024 21:25:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Requ%C3%AAte-inner-join-conditional/m-p/916642#M361026</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2024-02-17T21:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to change order of variables in the graph produced by lines in glimmix</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-change-order-of-variables-in-the-graph-produced-by-lines/m-p/916641#M41024</link>
      <description>&lt;P&gt;The &lt;STRONG&gt;&lt;EM&gt;Lines&lt;/EM&gt;&lt;/STRONG&gt; graph must represent the class levels ordered by &lt;EM&gt;&lt;STRONG&gt;Estimate&lt;/STRONG&gt;&lt;/EM&gt; values. Otherwise, how would it show, for example, in your graph, the link between levels &lt;EM&gt;N15&lt;/EM&gt; and &lt;EM&gt;N200&lt;/EM&gt; if they weren't adjacent?&lt;/P&gt;</description>
      <pubDate>Sat, 17 Feb 2024 20:53:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-change-order-of-variables-in-the-graph-produced-by-lines/m-p/916641#M41024</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2024-02-17T20:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate value within ID</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Duplicate-value-within-ID/m-p/913045#M45317</link>
      <description>&lt;P&gt;A datastep solution:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Assuming data is sorted by study_id */
data want;
do until(last.study_id);
    set have; by study_id;
    newdate = coalesce(newdate, swabdate);
    end;
do until(last.study_id);
    set have; by study_id;
    output;
    end;
format newdate mmddyy10.;
drop swabdate;
rename newdate=swabdate;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: This pics up the first non-missing date encountered. To get the last date, use:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;coalesce( swabdate, newdate)&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2024 20:49:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Duplicate-value-within-ID/m-p/913045#M45317</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2024-01-25T20:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Notation scientifique dans une variable de type alfanumerique $char10.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Notation-scientifique-dans-une-variable-de-type-alfanumerique/m-p/911316#M359369</link>
      <description>&lt;P&gt;Je crois que l'ID "6.09E+203" correspond à un ID original qui avait le malheur de ressembler à un nombre exprimé en notation scientifique et que Excel a automatiquement converti en nombre.&lt;/P&gt;
&lt;P&gt;Mais puisque plusieurs IDs, tels que "609E201", "6086E200", "6092E200" ou "60905E199" par exemple, seront convertis dans le même ID "6.09E+203" par Excel, il est impossible de retrouver avec certitude l'ID original.&lt;/P&gt;
&lt;P&gt;Il vous faudra donc, comme suggéré ci-haut, remonter à la source pour recouvrer les ID originaux.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 19:50:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Notation-scientifique-dans-une-variable-de-type-alfanumerique/m-p/911316#M359369</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2024-01-11T19:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Make new variables using if statements in proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Make-new-variables-using-if-statements-in-proc-sql/m-p/900954#M356065</link>
      <description>&lt;P&gt;Just for fun. If you &lt;STRONG&gt;&lt;EM&gt;really&lt;/EM&gt;&lt;/STRONG&gt; insist on using SQL :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID $   users_2016  users_2017  users_2018  users_2019  users_2020;
datalines;
jjones    1   1   0   0   0
asmith    0   1   1   1   0
;

proc sql;
create table want (year num, nbUsers num);
insert into want select 2016, count (distinct ID) from have where users_2016;
insert into want select 2017, count (distinct ID) from have where users_2017;
insert into want select 2018, count (distinct ID) from have where users_2018;
insert into want select 2019, count (distinct ID) from have where users_2019;
insert into want select 2020, count (distinct ID) from have where users_2020;
select * from want;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PGStats_0-1698780933434.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89287i3B0CE38FE036733C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PGStats_0-1698780933434.png" alt="PGStats_0-1698780933434.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 19:37:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Make-new-variables-using-if-statements-in-proc-sql/m-p/900954#M356065</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2023-10-31T19:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use GROUP BY to concatenate strings in SAS proc SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-GROUP-BY-to-concatenate-strings-in-SAS-proc-SQL/m-p/900464#M43891</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A useful coding tool for doing this is the DO UNTIL() loop&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.class out=class; 
by sex age; 
run;

data want (keep=sex age names);
length names $200;
do until(last.age);
    set class; by sex age;
    names = catx(", ", names, name);
    end;
run;

proc print data=want; 
var sex age names; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;Note that the CATX function trims its arguments, so there is no need to call TRIM.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PGStats_0-1698528599851.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89185iE2747F667EAD3338/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PGStats_0-1698528599851.png" alt="PGStats_0-1698528599851.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can join a long outstanding (since 2017) request for this functionnality in SAS/SQL at&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/Add-GROUP-CONCAT-function-to-proc-sql/idi-p/323092" target="_blank"&gt;https://communities.sas.com/t5/SASware-Ballot-Ideas/Add-GROUP-CONCAT-function-to-proc-sql/idi-p/323092&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Oct 2023 21:45:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-use-GROUP-BY-to-concatenate-strings-in-SAS-proc-SQL/m-p/900464#M43891</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2023-10-28T21:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need to remove the exponential from the number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-to-remove-the-exponential-from-the-number/m-p/892153#M352393</link>
      <description>&lt;P&gt;Impressive reverse engineering &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt; !&lt;/P&gt;
&lt;P&gt;Kudos!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 20:41:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-to-remove-the-exponential-from-the-number/m-p/892153#M352393</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2023-08-31T20:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: how can get help about "proc split"  online ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-can-get-help-about-quot-proc-split-quot-online/m-p/883502#M349085</link>
      <description>&lt;P&gt;It has been replaced by &lt;STRONG&gt;proc hpsplit&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2023 03:41:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-can-get-help-about-quot-proc-split-quot-online/m-p/883502#M349085</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2023-07-05T03:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: What will be the output if we do left join and Right join on the below table</title>
      <link>https://communities.sas.com/t5/New-SAS-User/What-will-be-the-output-if-we-do-left-join-and-Right-join-on-the/m-p/883344#M39212</link>
      <description>&lt;P&gt;A decent technical description of the SQL join operations (including the effect of missing (null) values) is given &lt;A href="https://documentation.sas.com/doc/en/vdmmlcdc/8.11/sqlproc/p0o4a5ac71mcchn1kc1zhxdnm139.htm#n0ldlmhh1xb8pxn1v9t97yy5gt2j" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 18:57:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/What-will-be-the-output-if-we-do-left-join-and-Right-join-on-the/m-p/883344#M39212</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2023-07-03T18:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: PROC NLIN failed to converge</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-NLIN-failed-to-converge/m-p/882838#M348826</link>
      <description>&lt;P&gt;The variable _STATUS_ in the OUTEST= dataset tells you which estimates are final (properly converged) or not.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 18:39:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-NLIN-failed-to-converge/m-p/882838#M348826</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2023-06-28T18:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: what's wrong with this code  &amp; how to  impute date with end date of month if date part not a</title>
      <link>https://communities.sas.com/t5/SAS-Programming/what-s-wrong-with-this-code-amp-how-to-impute-date-with-end-date/m-p/882216#M348562</link>
      <description>&lt;P&gt;Incorrect syntax... AND is a logical operator it cannot be used to mean &lt;EM&gt;Do this&lt;/EM&gt; AND &lt;EM&gt;that&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Replace&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;if date_datepart eq '' and date_monthpart eq '' then date_datepart='01' and date_monthpart = 'DEC';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;if date_datepart eq '' and date_monthpart eq '' then do;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;date_datepart='01';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;date_monthpart = 'DEC';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;end;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2023 19:44:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/what-s-wrong-with-this-code-amp-how-to-impute-date-with-end-date/m-p/882216#M348562</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2023-06-23T19:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: converting an edgelist dataset to an adjacency matrix, setting missing values as 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/converting-an-edgelist-dataset-to-an-adjacency-matrix-setting/m-p/880287#M347806</link>
      <description>&lt;P&gt;These network (graph) statistics are now available from PROC OPTGRAPH, for which you need the SAS Network Algorithms license.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/procgralg/procgralg_optgraph_details01.htm" target="_self"&gt;the procedure documentation&lt;/A&gt;, you only need a &lt;EM&gt;links&lt;/EM&gt; (i.e. from-to pairs) dataset to get it going.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The centrality statistics are requested with the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/procgralg/procgralg_optgraph_syntax04.htm" target="_self"&gt;CENTRALITY statement&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 20:16:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/converting-an-edgelist-dataset-to-an-adjacency-matrix-setting/m-p/880287#M347806</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2023-06-12T20:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: converting an edgelist dataset to an adjacency matrix, setting missing values as 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/converting-an-edgelist-dataset-to-an-adjacency-matrix-setting/m-p/880101#M347729</link>
      <description>&lt;P&gt;&lt;A href="https://www3.nd.edu/~cone/centralities/nodecentrality.html" target="_self"&gt;This page&lt;/A&gt; references 7 different measures of node centrality.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which centrality measure do you want to calculate? And do you want to do the calculation with SAS or simply provide a well formatted file to other software?&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 22:40:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/converting-an-edgelist-dataset-to-an-adjacency-matrix-setting/m-p/880101#M347729</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2023-06-11T22:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Two different ways to generate random numbers -the same or different ?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Two-different-ways-to-generate-random-numbers-the-same-or/m-p/876838#M346392</link>
      <description>&lt;P&gt;to get random numbers with method 2 you would need something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let n=5000000;

array _x{&amp;amp;n.} _temporary_;

if _n_ = 1 then do step = 1 to &amp;amp;n.;
	_X{step} = MY - SCALE*LOG(-LOG(Step));
	end;

do step = 1 to &amp;amp;n.;
	X = _X{rand("integer", &amp;amp;n.)};
	output;
	end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;those would look almost OK, as long as n is large, but wouldn't save any significant CPU resources.&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 04:37:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Two-different-ways-to-generate-random-numbers-the-same-or/m-p/876838#M346392</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2023-05-22T04:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Number of visit per patient</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-visit-per-patient/m-p/876304#M346229</link>
      <description>&lt;P&gt;Both codes can accomodate this change:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data wantPG;
do i = 1 by 1 until (last.name);
    set readin; by name notsorted;
    end;

length v $16;
select (i);
    when (1) v = "1 visit";
    when (2) v = "2 visits";
    otherwise v = "3 visits or more";
    end;
    
drop i visit;
rename v = visit;
run;

proc format;
value visits
  1 = "1 visit"
  2 = "2 visits"
  other = "3 or more visits"
;
run;

proc sql;
create table wantKB as
  select
    max(id) as maxId,
    name,
	max(visit) as lastVisit format=mmddyy10.,
    count(*) as visit format=visits.
  from readin
  group by name
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 May 2023 19:06:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-visit-per-patient/m-p/876304#M346229</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2023-05-17T19:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Number of visit per patient</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-of-visit-per-patient/m-p/876155#M346192</link>
      <description>&lt;P&gt;I suppose you want to do something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
do i = 1 by 1 until (last.id);
    set have; by id;
    end;

length v $16;
select (i);
    when (1) v = "1 visit";
    when (2) v = "2 visits";
    otherwise v = "3 visits or more";
    end;
    
drop i visit;
rename v = visit;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 May 2023 03:21:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-of-visit-per-patient/m-p/876155#M346192</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2023-05-17T03:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to I set 2 consecutive observations before and after a dummy equal to one</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-I-set-2-consecutive-observations-before-and-after-a-dummy/m-p/875716#M346016</link>
      <description>&lt;P&gt;With a single SQL step:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   proc sql;
   create table want as
   select 
    *,
    case when exists (
        select * 
        from trades 
        where intck("day", a.date, tradingDate) between -2 and 2
        )   then 1
            else . end as what_I_want
   from trades as a
   ;
   quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 May 2023 03:29:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-I-set-2-consecutive-observations-before-and-after-a-dummy/m-p/875716#M346016</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2023-05-15T03:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: optimized code for cartesian product</title>
      <link>https://communities.sas.com/t5/SAS-Programming/optimized-code-for-cartesian-product/m-p/875292#M345847</link>
      <description>&lt;P&gt;What operation are you trying to perform (in words).&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 17:10:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/optimized-code-for-cartesian-product/m-p/875292#M345847</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2023-05-11T17:10:09Z</dc:date>
    </item>
  </channel>
</rss>

