<?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>jcis7 Tracker</title>
    <link>https://communities.sas.com/kntur85557/tracker</link>
    <description>jcis7 Tracker</description>
    <pubDate>Wed, 13 May 2026 08:50:28 GMT</pubDate>
    <dc:date>2026-05-13T08:50:28Z</dc:date>
    <item>
      <title>Re: one to many update</title>
      <link>https://communities.sas.com/t5/SAS-Programming/one-to-many-update/m-p/935970#M367933</link>
      <description>&lt;P&gt;Thanks for pointing out I forgot to make variableX character.&lt;/P&gt;
&lt;P&gt;I need to update variableX only for years 2020-21 through 2023-24 so wondering how I do that.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 22:47:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/one-to-many-update/m-p/935970#M367933</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2024-07-16T22:47:52Z</dc:date>
    </item>
    <item>
      <title>one to many update</title>
      <link>https://communities.sas.com/t5/SAS-Programming/one-to-many-update/m-p/935964#M367930</link>
      <description>&lt;P&gt;G'day.&lt;/P&gt;
&lt;P&gt;Appreciate any help you can give.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've a file named fileA that has a unique identifying variable facility_code, no duplicates and it has variableX that I need to populate in fileB for certain years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've a second file named fileB (combined years of data) with the&amp;nbsp; facility_code listed once for each year so since the file which has 7 years worth of data, if the facility reported information each year, it will&amp;nbsp; be listed 7 times.&amp;nbsp; It may not have reported each of the years, only some.&lt;/P&gt;
&lt;P&gt;fileB is missing data for variable X in years 2020-21 through 2023-24.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a variable in fileA named variableX I want to populate in fileB for only 4 of the seven school years (2020-21, 2021-22, 2022-23, 2023-24).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do i update fileB, specifically variable X only for the four school years with the information&amp;nbsp; in FileA matched on facility_code for variable X only for specific school years?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I only know how to update the file if it is a one to one relationship in each file, for example if the facilty_code is listed only once in fileZ, code below, I know how to update it with the information in fileA (2nd SAS code window below).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks!&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA fileA;
 INPUT facility_code $ facility_type$ physical_zip$ variableX schoolyr$;
CARDS;
1234567 public 14524 Yes 2019-20
1234568 public 23561 No 2019-20
1234569 public 84972 No 2019-20
0234567 public 94801 Yes 2019-20
0234568 public 89024 No 2019-20 
0234569 public 28201 No 2019-20

;
RUN; 


DATA fileB;
 INPUT facility_code $ status$ facility_type$ physical_zip$ variableX schoolyr$;
CARDS;
1234567 active public 14524 Yes 2017-18
1234567 closed public 14524 Yes 2018-19
1234567 active public 14524 No  2017-18
1234567 closed public 14524 . 2021-22
1234568 active public 23561 Yes 2017-18
1234568 active public 23561 Yes 2018-19
1234568 active public 23561 Yes 2019-20
1234568 active public 23561 . 2020-21
1234568 active public 23561 . 2021-22
1234568 active public 23561 . 2022-23
1234568 active public 23561 . 2023-24
1234568 active public 23561 . 2018-19
1234569 closed public 84972 . 2020-21
1234569 closed public 84972 . 2021-22
1234569 closed public 84972 . 2022-23
1234569 closed public 84972 . 2023-24
0234567 active public 94801 . 2021-22
0234568 active public 89024 . 2022-23
0234569 active public 28201 . 2023-24

;
RUN; 



DATA want;
 INPUT facility_code $ status$ facility_type$ physical_zip$ variableX $ schoolyr$;
CARDS;
1234567 active public 14524 Yes 2017-18
1234567 closed public 14524 Yes 2018-19
1234567 active public 14524 No 2017-18
1234567 closed public 14524 Yes 2021-22
1234568 active public 23561 Yes 2017-18
1234568 active public 23561 Yes 2018-19
1234568 active public 23561 No 2019-20
1234568 active public 23561 No 2020-21
1234568 active public 23561 No 2021-22
1234568 active public 23561 No 2022-23
1234568 active public 23561 No 2023-24
1234568 active public 23561 No 2018-19
1234569 closed public 84972 No 2020-21
1234569 closed public 84972 No 2021-22
1234569 closed public 84972 No 2022-23
1234569 closed public 84972 No 2023-24
0234567 active public 94801 Yes 2021-22
0234568 active public 89024 No 2022-23
0234569 active public 28201 No 2023-24

;
RUN; 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data transaction;
  set fileA (keep=facility_code variableX);
run;

*--sort transaction;
proc sort data=transaction;
  by facility_code;
run;

*--sort list to be updated;
proc sort data=fileZ;
  by facility_code;
run;

*-update;
data updatedZ;
   update fileZ transaction updatemode=missingcheck;   
   by facility_code;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 22:07:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/one-to-many-update/m-p/935964#M367930</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2024-07-16T22:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a cutoff value across years for a specific ID</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-a-cutoff-value-across-years-for-a-specific-ID/m-p/829293#M327641</link>
      <description>Thank you! I looked up Sum Function and found:  SAS Help Center: SUM Function&amp;lt;&amp;gt;&lt;BR /&gt;So now, this works: &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;BR /&gt;if sum  (of lt90vax(*))=4 then any4=1;&lt;BR /&gt;  else any4=0;&lt;BR /&gt;run;&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Aug 2022 21:18:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-a-cutoff-value-across-years-for-a-specific-ID/m-p/829293#M327641</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2022-08-18T21:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a cutoff value across years for a specific ID</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-a-cutoff-value-across-years-for-a-specific-ID/m-p/829274#M327625</link>
      <description>Great - thank  you!&lt;BR /&gt;&lt;BR /&gt;  *   The code worked until:&lt;BR /&gt;&lt;BR /&gt;401&lt;BR /&gt;402  if sum of lt90vax(*))=4 then any4=1;&lt;BR /&gt;            --&lt;BR /&gt;            22&lt;BR /&gt;            76&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: (, [, {.&lt;BR /&gt;&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;&lt;BR /&gt;403    else any4=0;&lt;BR /&gt;404  run;&lt;BR /&gt;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WANT may be incomplete.  When this step was stopped there were 0 observations and 14 variables.&lt;BR /&gt;WARNING: Data set WANT was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;      real time           0.08 seconds&lt;BR /&gt;      cpu time            0.00 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  *   I tried adding a parenthesis and got the following error:&lt;BR /&gt;&lt;BR /&gt;441  end;&lt;BR /&gt;442&lt;BR /&gt;443  if sum of (lt90vax(*))=4 then any4=1;&lt;BR /&gt;            --          -&lt;BR /&gt;            22          386&lt;BR /&gt;            68          200&lt;BR /&gt;                        76&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, *, **, +, -, /, ;, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;&amp;lt;, &amp;gt;=, AND, EQ,&lt;BR /&gt;              GE, GT, LE, LT, MAX, MIN, NE, NG, NL, OR, ^=, |, ||, ~=.&lt;BR /&gt;&lt;BR /&gt;ERROR 386-185: Expecting an arithmetic expression.&lt;BR /&gt;&lt;BR /&gt;ERROR 68-185: The function OF is unknown, or cannot be accessed.&lt;BR /&gt;&lt;BR /&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;BR /&gt;&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;&lt;BR /&gt;444    else any4=0;&lt;BR /&gt;445  run;&lt;BR /&gt;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set N.WANT may be incomplete.  When this step was stopped there were 0 observations and 14 variables.&lt;BR /&gt;WARNING: Data set N.WANT was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;      real time           0.08 seconds&lt;BR /&gt;      cpu time            0.01 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  *   Then I tried removing the 'of' and got the following error:&lt;BR /&gt;&lt;BR /&gt;461  end;&lt;BR /&gt;462&lt;BR /&gt;463  if sum  (lt90vax(*))=4 then any4=1;&lt;BR /&gt;                      -&lt;BR /&gt;                      386&lt;BR /&gt;                      200&lt;BR /&gt;                      76&lt;BR /&gt;ERROR 386-185: Expecting an arithmetic expression.&lt;BR /&gt;&lt;BR /&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;BR /&gt;&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;&lt;BR /&gt;464    else any4=0;&lt;BR /&gt;465  run;&lt;BR /&gt;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set N.WANT may be incomplete.  When this step was stopped there were 0 observations and 14 variables.&lt;BR /&gt;WARNING: Data set N.WANT was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;      real time           0.43 seconds&lt;BR /&gt;      cpu time            0.03 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Aug 2022 19:38:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-a-cutoff-value-across-years-for-a-specific-ID/m-p/829274#M327625</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2022-08-18T19:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a cutoff value across years for a specific ID</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-a-cutoff-value-across-years-for-a-specific-ID/m-p/829238#M327608</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc transpose data=vax out=vax_wide prefix=pctvax;
by id;
id year;
var pctvax;
run;

data vax_wide1;
  set vax_wide;
 
  if pctvax2000 &amp;lt; 90 then pctvax2000LT90=1;
  if pctvax2001 &amp;lt; 90 then pctvax2001LT90=1;
  if pctvax2002 &amp;lt; 90 then pctvax2002LT90=1;
  if pctvax2003 &amp;lt; 90 then pctvax2003LT90=1;
  if pctvax2004 &amp;lt; 90 then pctvax2004LT90=1;
  if pctvax2005 &amp;lt; 90 then pctvax2005LT90=1;

if sum (pctvax2000LT90, pctvax2001LT90, pctvax2002LT90, pctvax2003LT90, pctvax2004LT90, pctvax2005LT90) =4 then any4=1;
  else any4=0;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This seems code above seems work for the simplified dataset I created.&amp;nbsp; I'm running into a problem where in the actual dataset, it counts missing values as &amp;lt;90. I can post it as a separate post. Thank you everyone for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 16:55:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-a-cutoff-value-across-years-for-a-specific-ID/m-p/829238#M327608</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2022-08-18T16:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a cutoff value across years for a specific ID</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-a-cutoff-value-across-years-for-a-specific-ID/m-p/829234#M327605</link>
      <description>Thanks - I'm looking for school year which is in the results of the code you posted. I'm looking for the school year across the top with the school code listed in the column where the current school year is listed in the results of the code you posted.&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Aug 2022 16:28:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-a-cutoff-value-across-years-for-a-specific-ID/m-p/829234#M327605</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2022-08-18T16:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Finding a cutoff value across years for a specific ID</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-a-cutoff-value-across-years-for-a-specific-ID/m-p/829207#M327594</link>
      <description>There are 6 years in the data (2000, 2001, 2002, 2003, 2004, 2005) and looking for IDs where pctvax&amp;lt;90 in any four years, for example:&lt;BR /&gt;Looking for ids with pctvax&amp;lt;90 in the following combination of years&lt;BR /&gt;2000, 2001, 2002, 2003&lt;BR /&gt;2000, 2002, 2003, 2004&lt;BR /&gt;2000, 2001, 2004, 2005&lt;BR /&gt;2001, 2002, 2003, 2004&lt;BR /&gt;Etc....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Aug 2022 14:24:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-a-cutoff-value-across-years-for-a-specific-ID/m-p/829207#M327594</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2022-08-18T14:24:30Z</dc:date>
    </item>
    <item>
      <title>Finding a cutoff value across years for a specific ID</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-a-cutoff-value-across-years-for-a-specific-ID/m-p/829115#M327557</link>
      <description>&lt;P&gt;G'day,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've a question -- I'm trying to find observations below a certain cutoff value across any four years for the same ID.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the data below and what I tried.&amp;nbsp; I realized it doesn't work.&amp;nbsp; what i want is to have identify in&amp;nbsp; a list that has ids which are below 90 for any four years (Yr), something like the table below.&amp;nbsp; Any help you can give is much appreciated. Or is there a better way to do it in proc sql?&amp;nbsp; Can this be done in the DATA step? Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 672pt;" border="0" width="896" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" style="height: 15.0pt; width: 48pt;"&gt;id&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;pctvax2000&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;pctvax2001&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;pctvax2002&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;pctvax2003&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;pctvax2004&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;pctvax2005&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;pctLT90_2000&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;pctLT90_2001&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;pctLT90_2002&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;pctLT90_2003&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;pctLT90_2004&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;pctLT90_2005&lt;/TD&gt;
&lt;TD width="64" style="width: 48pt;"&gt;any4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;1234567&lt;/TD&gt;
&lt;TD align="right"&gt;88&lt;/TD&gt;
&lt;TD align="right"&gt;90&lt;/TD&gt;
&lt;TD align="right"&gt;57&lt;/TD&gt;
&lt;TD align="right"&gt;95&lt;/TD&gt;
&lt;TD align="right"&gt;77&lt;/TD&gt;
&lt;TD align="right"&gt;62&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" align="right" style="height: 15.0pt;"&gt;1234568&lt;/TD&gt;
&lt;TD align="right"&gt;82&lt;/TD&gt;
&lt;TD align="right"&gt;91&lt;/TD&gt;
&lt;TD align="right"&gt;53&lt;/TD&gt;
&lt;TD align="right"&gt;78&lt;/TD&gt;
&lt;TD align="right"&gt;90&lt;/TD&gt;
&lt;TD align="right"&gt;95&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;1&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;0&lt;/TD&gt;
&lt;TD align="right"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;
&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
*--2017-18 ;
DATA vax;
 INPUT id $ pctvax  yr $;
CARDS;
1234567 88 2000
1234567 90 2001 
1234565 57 2002
1234567 95 2003 
1234567 77 2004
1234567 62 2005 
1234568 82 2000
1234568 91 2001 
1234568 53 2002
1234568 78 2003 
1234568 90 2004
1234568 45 2005 

;
RUN; 

data vax1;
  set vax;
   if yr='2000' then do;
     pctvax2000=pctvax;
     if pctvax2000&amp;lt;90 then pctLT90_2000=1; 
   end;

   if yr='2001' then do;
      pctvax2001=pctvax;
     if pctvax2001&amp;lt;90 then pctLT90_2001=1; 
   end;
   
    if yr='2002' then do;
    pctvax2002=pctvax;
     if pctvax2002&amp;lt;90 then pctLT90_2002=1;      
   end;

      if yr='2003' then do;
     pctvax2003=pctvax;
     if pctvax2003&amp;lt;90 then pctLT90_2003=1; 
   end;

      if yr='2004' then do;
    pctvax2004=pctvax;
     if pctvax2004&amp;lt;90 then pctLT90_2004=1; 
   end;

      if yr='2005' then do;
     pctvax2005=pctvax;
     if pctvax2005&amp;lt;90 then pctLT90_2005=1; 
   end;

   if sum(pctLT90_2000, pctLT90_2001, pctLT90_2002, pctLT90_2003, pctLT90_2004, pctLT90_2005)=4 then  any4=1;
   else any4=0;

   run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 20:17:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-a-cutoff-value-across-years-for-a-specific-ID/m-p/829115#M327557</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2022-08-17T20:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: proc report across usage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-across-usage/m-p/811141#M319940</link>
      <description>&lt;P&gt;Hi Cynthia,&lt;/P&gt;
&lt;P&gt;Appreciate your guidance.&lt;/P&gt;
&lt;P&gt;I see the compute block needs to be different from what I have for pctutd for the ACROSS usage.&lt;/P&gt;
&lt;P&gt;I tried using the following (not sure which column SAS sees utd as since I don't have it listed in the column statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;compute pctutd;&lt;BR /&gt;pctutd=c5.sum/c4.sum;&lt;BR /&gt;endcompute;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and I'm now I"m getting the following error message:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;ERROR: The variable type of C5.SUM is invalid in this context.&lt;BR /&gt;ERROR: The variable type of C4.SUM is invalid in this context.&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 21:58:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-across-usage/m-p/811141#M319940</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2022-05-02T21:58:10Z</dc:date>
    </item>
    <item>
      <title>proc report across usage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-across-usage/m-p/810746#M319741</link>
      <description>&lt;P&gt;G'day,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the following program:&amp;nbsp; Part 1 &amp;amp; 2 runs without SAS errors except Part 3 doesn't run. I'm trying to add pctud so that is shows under type (i.e, ask SAS to&amp;nbsp; calculate pctutd&amp;nbsp; across the two different types) and also ask SAS to calculate it for the combined types (which is equivalent to pctutd in Part 2) so it will have 3 columns with pctutd: the first column (after locale, year, grade, and children)&amp;nbsp; with pctutd that sums utd for all types (type=class &amp;amp; nonclass) and divides it by the totalchildren for all types, the 2nd column that sums utd for observations with type=class and divides it by totalchildren for type=class&amp;nbsp; &amp;nbsp;and the 3rd column with pctutd for nonclass, all grouped by locale and year. Any help you can give will be greatly appreciated.&amp;nbsp; And it will have a last column that has the % of entities that have nonclass type:&amp;nbsp; so sas counts and sums the number of entities that have nonclass type for example in locale North and divides it by the total of entities in locale North, etc... Thank you.&lt;/P&gt;
&lt;PRE&gt;*Part 1--dataset;
data have;
   input locale $ year $ grade $ totalchildren  utd  type $;
   datalines;
North 2020 5th 120 119 class 
South 2020 5th 140 120 nonclass
East 2020 5th 18 10	nonclass
West 2020 5th 9 9 class
North 2020 5th 11 9 class


;


*Part 2--program that has no errors except it doesn't give output I want;

proc report data = have out=want nowd missing completerows ; 
column locale year grade totalchildren utd pctutd type; 

	define locale / group 'Locale'; 
	define year / group; define grade / group; 
	define totalchildren / analysis sum; 
	define utd / analysis noprint; 
	define pctutd / computed; 
		compute pctutd; 
		pctutd=utd.sum/totalchildren.sum; 
		endcompute;  
   define type / across 'Type'; 

   *--summarizes ALL; 
   rbreak before /summarize;    
   compute before; 
   locale= 'ALL'; 
   year="current"; 
   grade="5th"; 
   endcomp; 

run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Current output&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Report: Detailed and/or summarized report" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c header" colspan="5" scope="colgroup"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TH class="c header" colspan="2" scope="colgroup"&gt;Type&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="c header" scope="col"&gt;Locale&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;year&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;grade&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;totalchildren&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;pctutd&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;class&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;nonclass&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l dataemphasis"&gt;ALL&lt;/TD&gt;
&lt;TD class="l dataemphasis"&gt;current&lt;/TD&gt;
&lt;TD class="l dataemphasis"&gt;5th&lt;/TD&gt;
&lt;TD class="r dataemphasis"&gt;298&lt;/TD&gt;
&lt;TD class="r dataemphasis"&gt;0.8959732&lt;/TD&gt;
&lt;TD class="r dataemphasis"&gt;3&lt;/TD&gt;
&lt;TD class="r dataemphasis"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;East&lt;/TD&gt;
&lt;TD class="l data"&gt;2020&lt;/TD&gt;
&lt;TD class="l data"&gt;5th&lt;/TD&gt;
&lt;TD class="r data"&gt;18&lt;/TD&gt;
&lt;TD class="r data"&gt;0.5555556&lt;/TD&gt;
&lt;TD class="r data"&gt;0&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;North&lt;/TD&gt;
&lt;TD class="l data"&gt;2020&lt;/TD&gt;
&lt;TD class="l data"&gt;5th&lt;/TD&gt;
&lt;TD class="r data"&gt;131&lt;/TD&gt;
&lt;TD class="r data"&gt;0.9770992&lt;/TD&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;South&lt;/TD&gt;
&lt;TD class="l data"&gt;2020&lt;/TD&gt;
&lt;TD class="l data"&gt;5th&lt;/TD&gt;
&lt;TD class="r data"&gt;140&lt;/TD&gt;
&lt;TD class="r data"&gt;0.8571429&lt;/TD&gt;
&lt;TD class="r data"&gt;0&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;West&lt;/TD&gt;
&lt;TD class="l data"&gt;2020&lt;/TD&gt;
&lt;TD class="l data"&gt;5th&lt;/TD&gt;
&lt;TD class="r data"&gt;9&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;0&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;PRE&gt;&lt;CODE class=" language-sas"&gt;
*--part 3 - nonworking program
proc report data = have out=want nowd missing completerows ; 
column locale year grade totalchildren type,pctutd&lt;BR /&gt;('Overall' type pctutd);

	define locale / group 'Locale'; 
	define year / group; define grade / group; 
	define totalchildren / analysis sum; 
	define utd / analysis noprint;  
	define pctutd / computed; 
		compute pctutd; 
		pctutd=utd.sum/totalchildren.sum; 
		endcompute;  
   define type / across 'Type'; 

   *--summarizes ALL; 
   rbreak before /summarize;    
   compute before; 
   locale= 'ALL'; 
   year="current"; 
   grade="5th"; 
   endcomp; 

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 29 Apr 2022 21:04:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-across-usage/m-p/810746#M319741</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2022-04-29T21:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Update one dataset with same value for selected field for only ids in another dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-one-dataset-with-same-value-for-selected-field-for-only/m-p/809790#M319346</link>
      <description>&lt;P&gt;Thank you everyone!&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 22:30:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-one-dataset-with-same-value-for-selected-field-for-only/m-p/809790#M319346</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2022-04-25T22:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Update one dataset with same value for selected field for only ids in another dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-one-dataset-with-same-value-for-selected-field-for-only/m-p/808454#M318790</link>
      <description>&lt;P&gt;Thanks for catching that I didn't name the dataset in the set statement in the&amp;nbsp; 'data updateddataset' statement 'toupdatedataset' and instead named it 'toupdate'.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 23:03:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-one-dataset-with-same-value-for-selected-field-for-only/m-p/808454#M318790</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2022-04-18T23:03:45Z</dc:date>
    </item>
    <item>
      <title>Update one dataset with same value for selected field for only ids in another dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-one-dataset-with-same-value-for-selected-field-for-only/m-p/808449#M318785</link>
      <description>&lt;P&gt;G'day!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Appreciate any help you can give.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've two datasets with the following names and content:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&amp;nbsp;'idsdataset' that has the variable name 'id' and 'type'&lt;/LI&gt;
&lt;LI&gt;'toupdatedataset' that has the variable names 'id', 'type', and 'status'&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to update the field 'status' in the dataset 'toupdatedataset' with the value 'N' for all of the observations in the 'idsdataset' dataset based on 'id' in both datasets.&lt;/P&gt;
&lt;P&gt;The outcome I'm looking for is listed in the dataset 'updateddataset'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I update 'status' field without needing to enter each 'id' individually?&amp;nbsp; Thank you.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data idsdataset;
   input id $ type$;
   datalines;
1234567 Pub
1245678 Pub
;
data toupdatedataset;
   input id $ type $ status $;
   datalines;
1234567 Pub .
1245678  Pub . 
2349878 Pri N
3948573 Priv Y
;

data updateddataset;
  set toupdate;
if id in ('1234567' , '1245678') then status='N';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 22:28:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-one-dataset-with-same-value-for-selected-field-for-only/m-p/808449#M318785</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2022-04-18T22:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: At least one file associated with fileref IMPORT is still in use. ERROR: Error in the FIL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-At-least-one-file-associated-with-fileref-IMPORT-is-still/m-p/806815#M317955</link>
      <description>&lt;P&gt;Thank you both&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 17:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-At-least-one-file-associated-with-fileref-IMPORT-is-still/m-p/806815#M317955</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2022-04-08T17:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: At least one file associated with fileref IMPORT is still in use. ERROR: Error in the FIL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-At-least-one-file-associated-with-fileref-IMPORT-is-still/m-p/806643#M317851</link>
      <description>&lt;P&gt;Can you help me understand:&amp;nbsp; When you ask, am I trying to do something with the file that is active in the editor,&amp;nbsp; do as you asking if&amp;nbsp; I&amp;nbsp; am trying to use a file that was created in the sas program that the filename statement is at the end of? Or are you asking if I'm trying to do something with the SAS program file that is in the filename statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on your question, I selected the 'Break' button to cancel anything that had been running. Then I reran the program that the filename statement is at the end of, and no error came up.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, I closed SAS, reopened it and the program ran with no errors including the filename import statement at the end. I am trying to figure out if I'm doing something wrong and not do it again in the future. Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 19:46:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-At-least-one-file-associated-with-fileref-IMPORT-is-still/m-p/806643#M317851</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2022-04-07T19:46:46Z</dc:date>
    </item>
    <item>
      <title>ERROR: At least one file associated with fileref IMPORT is still in use. ERROR: Error in the FILENAM</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-At-least-one-file-associated-with-fileref-IMPORT-is-still/m-p/806606#M317834</link>
      <description>&lt;P&gt;G'day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have placed a filename near the end of a SAS program&amp;nbsp; and am getting the following error message:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: At least one file associated with fileref IMPORT is still in use.&lt;BR /&gt;ERROR: Error in the FILENAME statement.&lt;/P&gt;
&lt;P&gt;This is the filename code. When I run the file SAS program.sas by itself, I don't get an error statement. Howeber, when I run the program the code below sits in, I get the error statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename importv 'C:\SAS Programs\SAS program.sas';
%include importv;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Any help you can give will e much appreciated.&amp;nbsp; Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 18:41:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-At-least-one-file-associated-with-fileref-IMPORT-is-still/m-p/806606#M317834</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2022-04-07T18:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: Data file J.ALL.DATA is in a format that is native to another host, or the file encoding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/NOTE-Data-file-J-ALL-DATA-is-in-a-format-that-is-native-to/m-p/703714#M79941</link>
      <description>Thanks.  I tried it and I am still getting the same encoding error.&lt;BR /&gt;When I check the dataset the encoding is the following:  shift-jis Japanese (SJIS)&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Dec 2020 20:07:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/NOTE-Data-file-J-ALL-DATA-is-in-a-format-that-is-native-to/m-p/703714#M79941</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2020-12-04T20:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: NOTE: Data file J.ALL.DATA is in a format that is native to another host, or the file encoding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/NOTE-Data-file-J-ALL-DATA-is-in-a-format-that-is-native-to/m-p/703699#M79939</link>
      <description>Hi, Thanks! I found the following &lt;A href="https://support.sas.com/kb/51/586.html" target="_blank"&gt;https://support.sas.com/kb/51/586.html&lt;/A&gt;&amp;lt;&amp;gt;&lt;BR /&gt;and changed it but it asked me if I wanted to save the file and the only option is to save it as .txt or under All Files but not a cfg file.  What next?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Dec 2020 18:58:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/NOTE-Data-file-J-ALL-DATA-is-in-a-format-that-is-native-to/m-p/703699#M79939</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2020-12-04T18:58:07Z</dc:date>
    </item>
    <item>
      <title>NOTE: Data file J.ALL.DATA is in a format that is native to another host, or the file encoding</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/NOTE-Data-file-J-ALL-DATA-is-in-a-format-that-is-native-to/m-p/703685#M79937</link>
      <description>&lt;P&gt;G'day!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just switched computers.&amp;nbsp; I am having trouble with SAS as I had an already existing SAS file that I am asking SAS to recognize and am getting the following note and error:&lt;/P&gt;
&lt;P&gt;NOTE: Data file J.ALL.DATA is in a format that is native to another host, or the file encoding does not match the session&lt;/P&gt;
&lt;P&gt;encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce&lt;/P&gt;
&lt;P&gt;performance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: Some character data was lost during transcoding in the dataset J.ALL.DATA. Either the data contains characters that are&lt;/P&gt;
&lt;P&gt;not representable in the new encoding or truncation occurred during transcoding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help you can give will be much appreciated.&amp;nbsp; Thank you.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&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;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 17:45:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/NOTE-Data-file-J-ALL-DATA-is-in-a-format-that-is-native-to/m-p/703685#M79937</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2020-12-04T17:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting within range</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Selecting-within-range/m-p/659167#M197529</link>
      <description>Edited and noted for future reference. I thought the 'insert SAS code' window would only show up as a small window on the post with a limited number of lines (like the message you create does).  Apologies.&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Jun 2020 23:44:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Selecting-within-range/m-p/659167#M197529</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2020-06-15T23:44:12Z</dc:date>
    </item>
  </channel>
</rss>

