<?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>SAS Studio topics</title>
    <link>https://communities.sas.com/t5/SAS-Studio/bd-p/sas_studio</link>
    <description>SAS Studio topics</description>
    <pubDate>Thu, 22 Jul 2021 17:37:10 GMT</pubDate>
    <dc:creator>sas_studio</dc:creator>
    <dc:date>2021-07-22T17:37:10Z</dc:date>
    <item>
      <title>Unable to Rename - Proc Transpose; SAS on Demand</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Unable-to-Rename-Proc-Transpose-SAS-on-Demand/m-p/753469#M10069</link>
      <description>&lt;P&gt;Dear Reeza or any other senior members,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been trying to solve this on my own but I am stuck.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been using SAS Studio UE since 2015 and I have no issue running this proc transpose and rename statement. But since I migrate to SAS on Demand, and running the same code, I received this error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasWarning focus-line"&gt;WARNING: The variable _1 in the DROP, KEEP, or RENAME list has never been referenced.&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;WARNING: The variable _2 in the DROP, KEEP, or RENAME list has never been referenced.&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My codes;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc means data=msia.mewretdat mean t probt;
 class momr;
 var mewret;
run;

/* Calculate Buy-Sell Portfolio Returns */
Proc sort data=msia.mewretdat; by date momr; run;
proc transpose data=msia.mewretdat out=msia.mewretdat1 (rename=(_1=Sell _2=BUY));
 by date;
 id momr;
 var mewret;

data msia.mewretdat2;
set msia.mewretdat1;
BUY_SELL=BuY-Sell;
Run;

Proc means data=msia.mewretdat2 n mean t probt;
 var Sell Buy Buy_Sell;
Run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Appreciate the guidance.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;/P&gt;&lt;P&gt;Alpha&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 12:04:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Unable-to-Rename-Proc-Transpose-SAS-on-Demand/m-p/753469#M10069</guid>
      <dc:creator>alphangadan</dc:creator>
      <dc:date>2021-07-12T12:04:06Z</dc:date>
    </item>
    <item>
      <title>Help with Shewhart Control Chart</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Help-with-Shewhart-Control-Chart/m-p/752570#M10061</link>
      <description>&lt;P&gt;I'm want to create an XSchart&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the code I used but the chart was split into 5 instead of 1. The dates in my data are 09/01/2020, 10/01/2020, 11/01/2020, and so on. Do I need to include something that will make just 1 chart?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title "Length of Stay";
symbol v=dot;

proc shewhart data=work.nowsbaseline_sorted;
	xschart neonatald*measureperiodid;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 23:13:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Help-with-Shewhart-Control-Chart/m-p/752570#M10061</guid>
      <dc:creator>annaabimbola</dc:creator>
      <dc:date>2021-07-08T23:13:42Z</dc:date>
    </item>
    <item>
      <title>Restrict certain file types from Folder Shortcut explorer</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Restrict-certain-file-types-from-Folder-Shortcut-explorer/m-p/752376#M10055</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;From Folder shortcut file explorer, by default you can see all files located under the actual folder. Now if a user try to open .RTF files, SAS studio actually download that file onto user's local machine, which we want to avoid.&lt;/P&gt;&lt;P&gt;So, Is there any way/setup such that we can restrict some files from the explorer view? Like I want to restrict .RTF files from the view so that user can not download/open .RTF file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 18:12:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Restrict-certain-file-types-from-Folder-Shortcut-explorer/m-p/752376#M10055</guid>
      <dc:creator>samir_par</dc:creator>
      <dc:date>2021-07-06T18:12:51Z</dc:date>
    </item>
    <item>
      <title>if/then problem creating a variable</title>
      <link>https://communities.sas.com/t5/SAS-Studio/if-then-problem-creating-a-variable/m-p/751026#M10051</link>
      <description>&lt;P&gt;I'm using ODA, trying to create a variable with this code -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname adeno '/home/u58566978/adeno';&lt;BR /&gt;data work.adeno1;&lt;BR /&gt;set adeno.finch_gjred;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data work.adeno1;&lt;BR /&gt;set adeno.finch_gjred;&lt;BR /&gt;if beertotl=2 and beerfrq2=0 and beerfrqx2=0 and beernum2=98 then wrong=0;&lt;BR /&gt;if beertotl=3 and beerfrq3=0 and beerfrqx3=0 and beernum3=98 then wrong=0;&lt;BR /&gt;if beertotl=4 and beerfrq4=0 and beerfrqx4=0 and beernum4=98 then wrong=0;&lt;BR /&gt;if beertotl=5 and beerfrq5=0 and beerfrqx5=0 and beernum5=98 then wrong=0;&lt;BR /&gt;if beertotl=6 and beerfrq6=0 and beerfrqx6=0 and beernum6=98 then wrong=0;&lt;BR /&gt;if beertotl=7 and beerfrq7=0 and beerfrqx7=0 and beernum7=98 then wrong=0;&lt;BR /&gt;if beertotl=8 and beerfrq8=0 and beerfrqx8=0 and beernum8=98 then wrong=0;&lt;BR /&gt;if beertotl=9 and beerfrq9=0 and beerfrqx9=0 and beernum9=98 then wrong=0;&lt;BR /&gt;if beertotl=10 and beerfrq10=0 and beerfrqx10=0 and beernum10=98 then wrong=0;&lt;BR /&gt;if beertotl=11 and beerfrq11=0 and beerfrqx11=0 and beernum11=98 then wrong=0;&lt;BR /&gt;if beertotl=12 and beerfrq12=0 and beerfrqx12=0 and beernum12=98 then wrong=0;&lt;BR /&gt;else wrong=1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc freq data=work.adeno1;&lt;BR /&gt;tables wrong;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;....but when I do that, this is the table I get.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-06-29 at 1.56.49 PM.png" style="width: 952px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60815iF29BDFD9028EB725/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2021-06-29 at 1.56.49 PM.png" alt="Screen Shot 2021-06-29 at 1.56.49 PM.png" /&gt;&lt;/span&gt;When I exclude the 'else wrong=1' line, I get this, which is what I want, but I need to have a "1=832" line instead of those people being considered missing. Is this an ordering problem in my code? Any help is much appreciated.&amp;nbsp;&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="Screen Shot 2021-06-29 at 1.58.43 PM.png" style="width: 822px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60816iE6CC1FF5941B5F15/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2021-06-29 at 1.58.43 PM.png" alt="Screen Shot 2021-06-29 at 1.58.43 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 18:00:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/if-then-problem-creating-a-variable/m-p/751026#M10051</guid>
      <dc:creator>gejoachim99</dc:creator>
      <dc:date>2021-06-29T18:00:41Z</dc:date>
    </item>
    <item>
      <title>ERROR: Variable MIGRATION not found.</title>
      <link>https://communities.sas.com/t5/SAS-Studio/ERROR-Variable-MIGRATION-not-found/m-p/750660#M10046</link>
      <description>&lt;P&gt;I run the following code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc contents data=data.alverdens_lande out=al;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc means data=al;&lt;BR /&gt;var Migration;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;The first part comes out fine, tells me all about the variable of which there 6 and 2 categorical variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But then when i try to run mean of one of the numerical variables it cant find it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Might be an easy fix?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Jun 2021 12:32:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/ERROR-Variable-MIGRATION-not-found/m-p/750660#M10046</guid>
      <dc:creator>RazaTheLegend</dc:creator>
      <dc:date>2021-06-27T12:32:32Z</dc:date>
    </item>
    <item>
      <title>New Variable</title>
      <link>https://communities.sas.com/t5/SAS-Studio/New-Variable/m-p/750632#M10042</link>
      <description>&lt;P&gt;Apologies in advance, I am very new to SAS and am having trouble with an assignment.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm getting error 161-185 no matching DO/SELECT statement. The assignment is described below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Within the datastep create the following new variables:&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;(a) A new variable called agecat that divides age into 5 categories:45-49;50-54;55-59;60-&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;64;65-69. Give values 1-5 for the categories.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;(b) A new variable called income40 equal to 0 if income is less than $40,000 and equal to&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;1 if income is $40,000 or more.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;(c) A new variable called collgrad equal to 0 if the participant did not graduate from college&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;and equal to 1 if the participant graduated from college (see study forms for income and&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;education categories)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;(d) A new variable that is the lowest of the two serum potassium values&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my SAS code right now (still haven't gotten to parts C and D):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;libname t '/home/u58860515/';&lt;BR /&gt;data tdata; set t.tomhs (keep=age sex income educ hdlbl potassbl potass12);&lt;BR /&gt;if age = 45-49 then agecat = 1; else&lt;BR /&gt;if age = 50-54 then agecat = 2; else&lt;BR /&gt;if age = 55-59 then agecat = 3; else&lt;BR /&gt;if age = 60-64 then agecat = 4; else&lt;BR /&gt;if age = 65-69 then agecat = 5; end;&lt;BR /&gt;if income &amp;lt; 40000 then income40 = 0; else&lt;BR /&gt;if income &amp;gt; 40000 then income40 = 1; end;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Jun 2021 03:37:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/New-Variable/m-p/750632#M10042</guid>
      <dc:creator>sassypixie</dc:creator>
      <dc:date>2021-06-27T03:37:38Z</dc:date>
    </item>
    <item>
      <title>Emailing from SAS Studio - New files only accessible after signing off and back on</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Emailing-from-SAS-Studio-New-files-only-accessible-after-signing/m-p/750293#M10025</link>
      <description>&lt;P&gt;I have just begun an effort to migrate existing z/OS based programs from the mainframe to Linux.&amp;nbsp; I am using SAS Studio to run the programs.&amp;nbsp; So far everything has worked smoothly and I am very pleased with SAS Studio.&amp;nbsp; One mystery has me scratching my head...&amp;nbsp; When I create/update .CSV files in my SAS program that are written on the server my email step cannot find the file unless I log off SAS Studio and log back in.&amp;nbsp; Then it finds the file.&amp;nbsp; A minor annoyance, but I am sure there is a solution.&amp;nbsp; I am new to SAS Studio, but I am not new to the SAS Programming language.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 19:45:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Emailing-from-SAS-Studio-New-files-only-accessible-after-signing/m-p/750293#M10025</guid>
      <dc:creator>GlennGail</dc:creator>
      <dc:date>2021-06-24T19:45:51Z</dc:date>
    </item>
    <item>
      <title>Git in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Git-in-SAS-Studio/m-p/748730#M10021</link>
      <description>&lt;P&gt;Hello All.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the paper from the SAS global forum, it shows how to insert a SSH key into sas studio.&amp;nbsp; It shows the location as being on the C drive which is where mine is.&amp;nbsp; The problem is that sas studio is on an unix server and it doesn't appear that I can access my C drive.&amp;nbsp; Does anyone know how I can access the c drive in studio or do I need to copy the SSH unto an unix folder?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Debra Hudson&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 16:45:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Git-in-SAS-Studio/m-p/748730#M10021</guid>
      <dc:creator>lid9zkr</dc:creator>
      <dc:date>2021-06-17T16:45:49Z</dc:date>
    </item>
    <item>
      <title>PROC EXPORT * MS-Excel \ SHEET TAB NAME "&amp;"  - Wanted: ICD9 &amp; HCC</title>
      <link>https://communities.sas.com/t5/SAS-Studio/PROC-EXPORT-MS-Excel-SHEET-TAB-NAME-quot-amp-quot-Wanted-ICD9/m-p/747844#M10019</link>
      <description>&lt;P&gt;I’m new to using SAS a little --- doing a fairly simple data base export to MS-Excel.&lt;/P&gt;&lt;P&gt;It works but am unable to get the MS-Excel Tab Name as needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MS-Excel Tab Name --- SAS PROC EXPORT \ SHEET Definition&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MS-Excel Tab Name – Wanted: ICD9 &amp;amp; HCC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’ve tried and it seems to fails to execute.&amp;nbsp;&amp;nbsp; Is there a way ?&amp;nbsp;&amp;nbsp;&amp;nbsp; Using SHEET to set the Tab Name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#-#-#-#-#-#-#-#-#-#-#-#-#&lt;/P&gt;&lt;P&gt;PROC EXPORT DATA=RPTTBL_EDG01&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;/P&gt;&lt;P&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;OUTFILE="\\xxxxx\EDG.YYYY.MM.DD.xlsx"&lt;/P&gt;&lt;P&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;DBMS=EXCELCS REPLACE;&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;/P&gt;&lt;P&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;SHEET='ICD9 ^ HCC';&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;/P&gt;&lt;P&gt;#-#-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 15:35:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/PROC-EXPORT-MS-Excel-SHEET-TAB-NAME-quot-amp-quot-Wanted-ICD9/m-p/747844#M10019</guid>
      <dc:creator>Greg_Azevedo_KP</dc:creator>
      <dc:date>2021-06-14T15:35:55Z</dc:date>
    </item>
    <item>
      <title>How to put SAS on Demand for Academics in an icon on my screen?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-put-SAS-on-Demand-for-Academics-in-an-icon-on-my-screen/m-p/747486#M10016</link>
      <description>&lt;P&gt;After using SAS professionally for decades, I've retired. But I'm giving some presentations with SAS at regionals. So, I downloaded&amp;nbsp;&amp;nbsp; SODA Studio.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I am wondering is if I can put a link to this on my screen, rather than having to go through the link in the e-mail that SAS sent to me.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 21:16:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-put-SAS-on-Demand-for-Academics-in-an-icon-on-my-screen/m-p/747486#M10016</guid>
      <dc:creator>plf515</dc:creator>
      <dc:date>2021-06-11T21:16:28Z</dc:date>
    </item>
    <item>
      <title>Histogram does not reflect summary statistics.</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Histogram-does-not-reflect-summary-statistics/m-p/746514#M10007</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Based on the summary statistics using, the mode is 0. In that case, shouldn't the histogram reflect 0 as the highest frequency?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*summary stats;
proc means data= libref.data2 mean std var min max n median mode;
run;

*histogram;
proc univariate data= libref.data2;
histogram;
run;&lt;/CODE&gt;&lt;/PRE&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="WhatsApp Image 2021-06-09 at 00.24.34.jpeg" style="width: 446px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60135i73AF0F455148AFD6/image-size/large?v=v2&amp;amp;px=999" role="button" title="WhatsApp Image 2021-06-09 at 00.24.34.jpeg" alt="WhatsApp Image 2021-06-09 at 00.24.34.jpeg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WhatsApp Image 2021-06-09 at 00.25.20.jpeg" style="width: 445px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/60136iB2A6B8522A227C90/image-size/large?v=v2&amp;amp;px=999" role="button" title="WhatsApp Image 2021-06-09 at 00.25.20.jpeg" alt="WhatsApp Image 2021-06-09 at 00.25.20.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 17:01:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Histogram-does-not-reflect-summary-statistics/m-p/746514#M10007</guid>
      <dc:creator>karenktq</dc:creator>
      <dc:date>2021-06-08T17:01:33Z</dc:date>
    </item>
    <item>
      <title>How to access SAMPSRC library in SAS/IML from SAS onDemand for Academics?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-access-SAMPSRC-library-in-SAS-IML-from-SAS-onDemand-for/m-p/745861#M9997</link>
      <description>&lt;P&gt;I am teaching myself how to use lists in SAS/IML as available in SAS onDemand for Academics. The sample program on the SAS/IML 15.1 User Guide p. 169 contains the code&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;%include sampsrc(LstBST.sas); /* define modules */&lt;BR /&gt;proc iml;&lt;BR /&gt;load module = _all_; /* load modules */&lt;BR /&gt;x = {5 3 1 9 1 6 4}`;&lt;BR /&gt;bst = BSTCreate(x);&lt;BR /&gt;title "Diagram of Binary Search Tree";&lt;BR /&gt;call BSTPlot(bst);&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;which, when I run the code, produces the following error message:&lt;/P&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;WARNING: Physical file does not exist, /pbr/sfw/sas/940/SASFoundation/9.4/samples/accesssample/LstBST.sas.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Cannot %INCLUDE member LstBST.sas in the aggregate SAMPSRC.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;164&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;165 %include sampsrc( LstBST.sas ) ; /* define modules */&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;166&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;167 proc iml ;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: IML Ready&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;168 load module=_all_ ;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Opening storage library WORK.IMLSTOR&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;168 ! /* load modules */&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;169&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;170 bst = BSTCreate( x ) ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Invocation of unresolved module BSTCREATE.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;statement : ASSIGN at line 170 column 4&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;171 title "Diagram of Binary Search Tree" ;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;172 call BSTPlot( bst ) ;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Invocation of unresolved module BSTPLOT.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;statement : CALL at line 172 column 4&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;173 quit ;&lt;/DIV&gt;&lt;PRE class="sasLog"&gt;&lt;FONT size="3"&gt;&lt;FONT size="4"&gt;Has anyone else encountered this error?&lt;/FONT&gt; Is the SAMPSRC library not included in the SAS/IML product for SAS onDemand for Academics?&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="4"&gt;Thanks in advance,&lt;BR /&gt;Ross Bettinger&lt;/FONT&gt;&lt;/PRE&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 17:17:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-access-SAMPSRC-library-in-SAS-IML-from-SAS-onDemand-for/m-p/745861#M9997</guid>
      <dc:creator>rbettinger</dc:creator>
      <dc:date>2021-06-04T17:17:30Z</dc:date>
    </item>
    <item>
      <title>SAS ODA times out while uploading large XPT file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SAS-ODA-times-out-while-uploading-large-XPT-file/m-p/745513#M9987</link>
      <description>&lt;P&gt;I am trying to upload the CDC's BRFSS2015.XPT file.&amp;nbsp; The file is 917 MB so well within the %GB space allowed.&amp;nbsp; However, after one hour, SAS ODA times out and the upload is cancelled.&amp;nbsp; Can I extend the time out to more than one hour?&amp;nbsp; If so, how?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 15:40:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SAS-ODA-times-out-while-uploading-large-XPT-file/m-p/745513#M9987</guid>
      <dc:creator>Ddormer</dc:creator>
      <dc:date>2021-06-03T15:40:21Z</dc:date>
    </item>
    <item>
      <title>How Do I Remove Course Files from SAS Studio Home Directory?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-Do-I-Remove-Course-Files-from-SAS-Studio-Home-Directory/m-p/745192#M9985</link>
      <description>&lt;P&gt;I am using SAS OnDemand for Academics and have A LOT of course files loaded in my home directory, counting against my personal data usage. I am now over my quota in my home directory while my course directory is at 0%. I do not use or want these course files but I receive a message that says I am not authorized to delete them. Is there a way to delete them or move them to their rightful home in the course directory?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 14:27:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-Do-I-Remove-Course-Files-from-SAS-Studio-Home-Directory/m-p/745192#M9985</guid>
      <dc:creator>oconnom60</dc:creator>
      <dc:date>2021-06-02T14:27:07Z</dc:date>
    </item>
    <item>
      <title>SAS Studio - folder shortcuts file is never updated</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SAS-Studio-folder-shortcuts-file-is-never-updated/m-p/744741#M9984</link>
      <description>&lt;P&gt;Hi guys!&lt;/P&gt;&lt;P&gt;We're using SAS 9.4_M6 and more specifically SAS Studio. One of our user has a very annoying issue: In the web interface, he adds a shortcut to a folder. When he quits his session, the shortcut should remain but it does not. Next time he logs in, he finds the shortcut section blank like it is the first time he uses it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For his colleagues, it's working fine, once they close the web page and reopen it, the shortcuts are still there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We found out that the file - C:\users\&amp;lt;accountname&amp;gt;\AppData\Roaming\SAS\SASStudio\preferences\SWE.folderShortcuts.key - is never updated for this user. (it is for the others)&lt;/P&gt;&lt;P&gt;He has a full control on the file and a tracing doesn't show any "access denied" or else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any experience with such behavior?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it was not obvious, we're running it on Windows (2012)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 08:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SAS-Studio-folder-shortcuts-file-is-never-updated/m-p/744741#M9984</guid>
      <dc:creator>el_grom</dc:creator>
      <dc:date>2021-05-31T08:38:10Z</dc:date>
    </item>
    <item>
      <title>SAS Studio 3.8 - Problems when trying to upload a file</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SAS-Studio-3-8-Problems-when-trying-to-upload-a-file/m-p/745092#M9981</link>
      <description>&lt;P&gt;&lt;SPAN&gt;We need to upload a file to SAS Studio but the file upload limit is set at 500 mb and the file is close to 3 Gb. We have the following error: "The size of the uploaded files cannot be greater than 500 MB. The size of the selected files is 2,8Gb.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Captura.PNG" style="width: 588px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59947iCB4E62F72641012C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Captura.PNG" alt="Captura.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I change that limit?&lt;BR /&gt;Is there any limitation on the maximum size?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 06:53:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SAS-Studio-3-8-Problems-when-trying-to-upload-a-file/m-p/745092#M9981</guid>
      <dc:creator>mvcastro</dc:creator>
      <dc:date>2021-06-02T06:53:30Z</dc:date>
    </item>
    <item>
      <title>Library weirdness</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Library-weirdness/m-p/744616#M9976</link>
      <description>&lt;P&gt;Using SAS Studio OnDemand for Academics, the following code generates a file (STATIONDATAEXISTING) under two LIBRARIES:&amp;nbsp; SOCAL and FORMATS .&amp;nbsp; Why would it create one in the FORMATS library?&amp;nbsp; When I delete it from the FORMATS library the entry under the SOCAL library disappears too.&amp;nbsp; Seems weird.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance for any guidance,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Gene&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data socal.stationdataexisting;
input station $ lat long alt az elev;
datalines;
US000S 34.290983 -116.383718 .898 198.31 54.33
US000V 33.960142 -117.259044 .533 47.06 67.3
US001Q 33.960142 -117.259044 .533 129.44 68.32
US001R 34.290983 -116.383718 .898 90 45
US001E 33.640000 -117.60 .500 . .
;
run;
data socal.stationdataexisting;
set socal.stationdataexisting;
/*Define Center of Grid as location of US000S*/
xpos=(long-(-116.383718))*91.09;
ypos=(lat-(34.29083))*111.19;
zpos= alt;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 29 May 2021 14:17:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Library-weirdness/m-p/744616#M9976</guid>
      <dc:creator>genemroz</dc:creator>
      <dc:date>2021-05-29T14:17:32Z</dc:date>
    </item>
    <item>
      <title>Sas programming in enterprise guide and creating dashboards in visual analytics</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Sas-programming-in-enterprise-guide-and-creating-dashboards-in/m-p/743364#M9971</link>
      <description>I am the beginner in sas programming using enterprise guide and creating dashboard using visual analytics. I have learned sas programming in enterprise guiDe and learned visual analytics. If i am given the project for first time, whats the whole procedure from creating dataset in enterprise guide , uploading to server and using that dataset in visual analytics. Pls help i am totally new.</description>
      <pubDate>Mon, 24 May 2021 13:10:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Sas-programming-in-enterprise-guide-and-creating-dashboards-in/m-p/743364#M9971</guid>
      <dc:creator>sas_it</dc:creator>
      <dc:date>2021-05-24T13:10:16Z</dc:date>
    </item>
    <item>
      <title>.sas7bdat file from server isn't showing up in SAS studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/sas7bdat-file-from-server-isn-t-showing-up-in-SAS-studio/m-p/739534#M9961</link>
      <description>&lt;P&gt;I've been using SAS University Edition for about a year now to do work using a .sas7bdat file that I access from a server, then put in my folder on my computer so I can access it in SAS - SASUniversityEdition&amp;gt;myfolders. This has worked for a year now, but in the last few days, even though I do the same thing, and put the same dataset in the same folders, it does not show up in SAS Studio anymore in the "Server files and folders" section. Any ideas for what could be going wrong? Is there some update that I missed?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also downloaded SAS on demand for academics to try and use that program instead, but then I can't figure out how to get my .sas7bdat file on there. So, an alternative question - how do I load my dataset on to this SAS program?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help with either or both questions would be much appreciated. If you need some more information just let me know, at a loss here. Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 15:52:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/sas7bdat-file-from-server-isn-t-showing-up-in-SAS-studio/m-p/739534#M9961</guid>
      <dc:creator>gejoachim99</dc:creator>
      <dc:date>2021-05-06T15:52:35Z</dc:date>
    </item>
    <item>
      <title>How to make a frequency table with statistics values?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-make-a-frequency-table-with-statistics-values/m-p/738359#M9957</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to make a table similar to this one below with the data I have attached. I cannot seem to figure out how to use proc freq to generate the frequencies, proc means ( or proc univariate ) to generate the statistics values and then combine them in this way into a table. If anyone could give me any pointers on how to start that would be awesome! thanks so much!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ellpap_0-1619908560327.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/58928i1CD50A96536BF5CC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ellpap_0-1619908560327.png" alt="ellpap_0-1619908560327.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ellpap_0-1619908798312.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/58929iCF7BEE00165610F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ellpap_0-1619908798312.png" alt="ellpap_0-1619908798312.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also these are the assumptions:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Treatment:&lt;/P&gt;&lt;P&gt;1 = Active&lt;BR /&gt;0 = Placebo&lt;/P&gt;&lt;P&gt;Gender:&lt;BR /&gt;1 = Male&lt;BR /&gt;2 = Female&lt;/P&gt;&lt;P&gt;Race&lt;BR /&gt;1 = White&lt;BR /&gt;2 = Black&lt;BR /&gt;3 = Other&lt;/P&gt;</description>
      <pubDate>Sat, 01 May 2021 22:40:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-make-a-frequency-table-with-statistics-values/m-p/738359#M9957</guid>
      <dc:creator>ellpap</dc:creator>
      <dc:date>2021-05-01T22:40:08Z</dc:date>
    </item>
    <item>
      <title>folder</title>
      <link>https://communities.sas.com/t5/SAS-Studio/folder/m-p/738134#M9953</link>
      <description>&lt;P&gt;Hi friends,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;would like to know if there any configuration that i can made to add an folder under home , i wonder if i can put a folder there that link to a physical folder (project folder) .&amp;nbsp;&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="elisehoo1_0-1619782247892.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/58888i3D2A9084D69F3EBA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="elisehoo1_0-1619782247892.png" alt="elisehoo1_0-1619782247892.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 11:32:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/folder/m-p/738134#M9953</guid>
      <dc:creator>elisehoo1</dc:creator>
      <dc:date>2021-04-30T11:32:09Z</dc:date>
    </item>
    <item>
      <title>Running SAS Program to Add CCSR Categories to NIS Data</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Running-SAS-Program-to-Add-CCSR-Categories-to-NIS-Data/m-p/738053#M9946</link>
      <description>&lt;P&gt;Dear SAS Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been struggling with my SAS Program to add Clinical Classifications Software Refined (CCSR) for ICD-10 CM diagnosis on to my National Inpatient Sample (NIS) core dataset. I have modified all the parts of the program as instructed in the DXCCSR user guide. Unfortunately I keep getting error messages.&lt;/P&gt;&lt;P&gt;Please find below a sample of my modifications to the program and a snap shot of the error messages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* FILE LOCATIONS ;&lt;BR /&gt;FILENAMe INRAW1 '/folders/myfolders/HCUP/NIS2018/DXCCSR_v2021-2.csv' lRECL=3000; *&amp;lt;=== USER MUST MODIFY;&lt;BR /&gt;LIBNAME IN1 '/folders/myfolders/HCUP/NIS2018'; *&amp;lt;=== USER MUST MODIFY;&lt;BR /&gt;LIBNAME OUT1 '/folders/myfolders/HCUP/NIS2018/NIS'; *&amp;lt;=== USER MUST MODIFY;&lt;/P&gt;&lt;P&gt;* OPTIONAL FILES ;&lt;BR /&gt;* Build vertical file? 1=yes, 0=no; %LET VERT=1; *&amp;lt;=== USER MUST MODIFY;&lt;BR /&gt;* Build default DXCCSR file? 1=yes, 0=no; %LET DFLT=1; *&amp;lt;=== USER MUST MODIFY;&lt;BR /&gt;* Build horizontal file? 1=yes, 0=no; %LET HORZ=0; *&amp;lt;=== USER MUST MODIFY;&lt;/P&gt;&lt;P&gt;* FILE NAMES ;&lt;BR /&gt;* Input SAS file member name; %LET CORE=NIS_2018_CORE; *&amp;lt;=== USER MUST MODIFY;&lt;BR /&gt;* Output SAS file name, vertical; %LET VERTFILE=NIS_CORE_OUTPUT_VERT; *&amp;lt;=== USER MUST MODIFY;&lt;BR /&gt;* Output SAS file name, horizontal; %LET HORZFILE=OUTPUT_HORZ_FILE_NAME; *&amp;lt;=== USER MUST MODIFY;&lt;BR /&gt;* Output SAS file name, default DXCCSR; %LET DFLTFILE=OUTPUT_DFLT_FILE_NAME; *&amp;lt;=== USER MUST MODIFY;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* INPUT DATA CHARACTERISTICS ;&lt;BR /&gt;* Database types, IP/OP/IO; %LET DBTYPE=IP; *&amp;lt;=== USER MUST MODIFY;&lt;BR /&gt;* Data element to identify IP/OP records; %LET IOVAR=DBTYPE; *&amp;lt;=== USER MUST MODIFY;&lt;BR /&gt;* Data value to identify IP records; %LET IOVALI=IP; *&amp;lt;=== USER MUST MODIFY;&lt;BR /&gt;* Data value to identify OP records; %LET IOVALO=OP; *&amp;lt;=== USER MUST;&lt;BR /&gt;* Linking key on input SAS data; %LET RECID=KEY; *&amp;lt;=== USER MUST MODIFY;&lt;BR /&gt;* Prefix of diagnosis variables; %LET DXPREFIX=I10_DX; *&amp;lt;=== USER MUST MODIFY;&lt;BR /&gt;* Maximum number of DXs on any record; %LET NUMDX=40; *&amp;lt;=== USER MUST MODIFY;&lt;BR /&gt;* Record specific DX Count variable, if not available leave it blank;&lt;BR /&gt;%LET NDXVAR=I10_NDX; *&amp;lt;=== USER MUST MODIFY;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error Messages&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ERROR: The variable KEY in the DROP, KEEP, or RENAME list has never been referenced.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;ERROR: The variable DBTYPE in the DROP, KEEP, or RENAME list has never been referenced.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;WARNING: The data set WORK.NIS_2018_CORESKINNY may be incomplete.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;When this step was stopped there were 0 observations and 0&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;variables.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;real time&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;cpu time&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;ERROR: BY variable KEY is not on input data set WORK.NIS_2018_CORESKINNY.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;WARNING: The data set WORK.IP_IN may be incomplete.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;When this step was stopped there were 0 observations and 0 variables.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;real time&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;cpu time&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;711:160&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;711:74&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;NOTE: Variable KEY is uninitialized.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;NOTE: Variable I10_NDX is uninitialized.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;ERROR: BY variable KEY is not on input data set WORK.IP_IN.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;WARNING: The variable KEY in the DROP, KEEP, or RENAME list has never been referenced.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;WARNING: The variable KEY in the DROP, KEEP, or RENAME list has never been referenced.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;WARNING: The data set WORK.IP_OUT_VT may be incomplete.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;When this step was stopped there were 0 observations and 4 variables.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;WARNING: The data set WORK.DXCCSR_FLAGS may be incomplete.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;When this step was stopped there were 0 observations and 3 variables.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;real time&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;0.03 seconds&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;cpu time&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;0.04 seconds&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;ERROR: The variable KEY in the DROP, KEEP, or RENAME list has never been referenced.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;WARNING: The data set WORK.IP_OUT_VT may be incomplete.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;When this step was stopped there were 0 observations and 4 variables.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;WARNING: Data set WORK.IP_OUT_VT was not replaced because this step was stopped.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;real time&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;cpu time&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ERROR: Variable KEY not found.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ERROR: BY variable KEY is not on input data set WORK.IP_OUT_VT.&lt;/P&gt;&lt;P&gt;ERROR: Variable KEY not found.&lt;/P&gt;&lt;P&gt;ERROR: Invalid value for the SORTEDBY option.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ERROR: The variable KEY in the DROP, KEEP, or RENAME list has never been referenced.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: BY variable KEY is not on input data set WORK.DXCCSR_FLAGS.&lt;/P&gt;&lt;P&gt;ERROR: BY variable KEY is not on input data set WORK.IP_DFLT_FILE.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ERROR: BY variable KEY is not on input data set WORK.IP_DFLT_FILE.&lt;/P&gt;&lt;P&gt;ERROR: Variable KEY not found.&lt;/P&gt;&lt;P&gt;ERROR: Invalid value for the SORTEDBY option.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Please does&amp;nbsp;anyone know what might be wrong?&amp;nbsp;I am quite new to SAS. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also, if anyone has any experience using the NIS dataset, please hit me up.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 00:08:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Running-SAS-Program-to-Add-CCSR-Categories-to-NIS-Data/m-p/738053#M9946</guid>
      <dc:creator>ededeStats</dc:creator>
      <dc:date>2021-04-30T00:08:57Z</dc:date>
    </item>
    <item>
      <title>Where is _DATAOUT documented</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Where-is-DATAOUT-documented/m-p/737698#M9945</link>
      <description>&lt;P&gt;I saw an interesting article on this site that seems to saying you can have SAS/Studio download a file that your SAS code generates.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I cannot find ANY documentation on this feature and how to use it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this program in SAS/Studio&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let _DATAOUT_MIME_TYPE=text/csv;
%let _DATAOUT_NAME=class.csv;

data _null_;
  file _dataout dsd ;
  set sashelp.class ;
  if _n_=1 then put 'name,age,sex';
  put name age sex;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Apr 2021 18:37:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Where-is-DATAOUT-documented/m-p/737698#M9945</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-04-28T18:37:49Z</dc:date>
    </item>
    <item>
      <title>Data does not appear in in SAS Viya</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Data-does-not-appear-in-in-SAS-Viya/m-p/737516#M9943</link>
      <description>&lt;P&gt;Hi, i'm trying to perform oversampling on SAS Studio. Before performing the oversampling, I have create cas session to connect with the libraries, here is the code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;cas casauto host="example.host" port=5570;
proc cas;
	session casauto;
	session.sessionstatus result=s;
	put s;
run;

CASLIB _ALL_ assign;
options casdatalimit=50G;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After that, i performed the oversampling and it worked just fine without any errors.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="adjie_0-1619603023241.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/58761i37A7CDB55D75BF16/image-size/medium?v=v2&amp;amp;px=400" role="button" title="adjie_0-1619603023241.png" alt="adjie_0-1619603023241.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see the output table is already listed on the public library. But when I tried to look for the table from SAS VA or Environment Manager the table doesn't appear. This issue also happened before when I ran a query file, the output table is listed on the library in SAS Studio but I couldn't find the table when I tried to add the data to SAS VA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did I miss anything?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 09:51:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Data-does-not-appear-in-in-SAS-Viya/m-p/737516#M9943</guid>
      <dc:creator>adjie</dc:creator>
      <dc:date>2021-04-28T09:51:20Z</dc:date>
    </item>
    <item>
      <title>Upload files tap in Explorer is disabled - SAS Studio 5.2</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Upload-files-tap-in-Explorer-is-disabled-SAS-Studio-5-2/m-p/736946#M9939</link>
      <description>&lt;P&gt;Hello,,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to SAS Studio and I have been working in the Trial. I am trying to upload a csv file from my computer to SAS Studio but the&amp;nbsp;Upload files tap in Explorer is disabled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone explain how to upload my files ?&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="SASUser07_0-1619436788646.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/58675iF84BC95A65A4554C/image-size/large?v=v2&amp;amp;px=999" role="button" title="SASUser07_0-1619436788646.png" alt="SASUser07_0-1619436788646.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 11:38:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Upload-files-tap-in-Explorer-is-disabled-SAS-Studio-5-2/m-p/736946#M9939</guid>
      <dc:creator>SASUser07</dc:creator>
      <dc:date>2021-04-26T11:38:22Z</dc:date>
    </item>
    <item>
      <title>Spline option grayed out in effect statement?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Spline-option-grayed-out-in-effect-statement/m-p/736877#M9937</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=compas1;
 effect PRIORspl=spline(priors_count / degree=2);
 model two_year_recid (event='0') = PRIORspl/ rsq lackfit;
 id compas_id priors_count;
 output out=one predicted=splpred
 reschi=splres;
 effectplot fit (x=priors_count);
 title1 'Continuous BP with Spline';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;My code is as above. The spline option doesn't turn blue as it's supposed to&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Apr 2021 17:45:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Spline-option-grayed-out-in-effect-statement/m-p/736877#M9937</guid>
      <dc:creator>ayosas</dc:creator>
      <dc:date>2021-04-25T17:45:18Z</dc:date>
    </item>
    <item>
      <title>Import sas7bdat with PROC IMPORT?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Import-sas7bdat-with-PROC-IMPORT/m-p/735753#M9933</link>
      <description>&lt;P&gt;Hello, I was wondering about how to import a sas7bdat file with proc import.&lt;/P&gt;&lt;P&gt;I've done some search for it but all I can find was using LIB with DATA.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 20:19:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Import-sas7bdat-with-PROC-IMPORT/m-p/735753#M9933</guid>
      <dc:creator>emmad511</dc:creator>
      <dc:date>2021-04-20T20:19:46Z</dc:date>
    </item>
    <item>
      <title>defining af new variable</title>
      <link>https://communities.sas.com/t5/SAS-Studio/defining-af-new-variable/m-p/734178#M9929</link>
      <description>&lt;P&gt;Hi. I am about to define a couple of new variables.I am working on a secure drive and can not copy paste my data or log.&lt;/P&gt;&lt;P&gt;I just does not work as intended. There are no errors or warnings in the log. But the data does not show up in the intended column.&lt;/P&gt;&lt;P&gt;So I want to create two new variables:&lt;/P&gt;&lt;P&gt;1: DRGambjan2014: which is the variable V_pris_genop if the date in d_hendto is jan and 2014&lt;/P&gt;&lt;P&gt;2:DRGambjun2014:&amp;nbsp;which is the variable V_pris_genop if the date in d_hendto is jun and 2014&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my code lookes like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data DRG1;&lt;/P&gt;&lt;P&gt;set DRG;&lt;/P&gt;&lt;P&gt;if year(d_hendto)=2014 and month(d_hendto)=jan then DRGambjan2014=v_pris_genop;&lt;/P&gt;&lt;P&gt;if year(d_hendto)=2014 and month(d_hendto)=jun then DRGambjun2014=v_pris_genop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it shows up as if data is missing, even where it is not.&lt;/P&gt;&lt;P&gt;why does it not work?&lt;/P&gt;&lt;P&gt;kind regards Jannie&lt;/P&gt;&lt;P&gt;kind regards&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 10:27:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/defining-af-new-variable/m-p/734178#M9929</guid>
      <dc:creator>Jannie_D</dc:creator>
      <dc:date>2021-04-15T10:27:56Z</dc:date>
    </item>
    <item>
      <title>Delete Folder with files from SAS OnDemand for Academics</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Delete-Folder-with-files-from-SAS-OnDemand-for-Academics/m-p/732490#M9925</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a problem in SAS onDemand for Academics.&lt;/P&gt;&lt;P&gt;My data storage is full and I want to delete an old project (folder).&lt;/P&gt;&lt;P&gt;But I'm not able to delete the folder since it is not empty (it has multiple subfolders and files).&lt;/P&gt;&lt;P&gt;Do I need to delete every single file and folder in this folder one by one or is there an easier option to directly delete the folder with all files and subfolders in it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!!!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 13:35:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Delete-Folder-with-files-from-SAS-OnDemand-for-Academics/m-p/732490#M9925</guid>
      <dc:creator>student12345678</dc:creator>
      <dc:date>2021-04-09T13:35:38Z</dc:date>
    </item>
    <item>
      <title>No files in libary</title>
      <link>https://communities.sas.com/t5/SAS-Studio/No-files-in-libary/m-p/731853#M9915</link>
      <description>&lt;P&gt;I am doing the&amp;nbsp;SAS Programming 1: Essentials course. For some reason no files apear in the pg library when i make it. The files are on my computer and i can access them in SAS from the same location by "proc import". I create the library by libname pg "myfolder\EPG1V2\data"; and it goes through in the log with no errors. No data is in the library however. I hope you can help, it is super frustrating.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 11:10:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/No-files-in-libary/m-p/731853#M9915</guid>
      <dc:creator>HamDerMathias</dc:creator>
      <dc:date>2021-04-07T11:10:46Z</dc:date>
    </item>
    <item>
      <title>Import mutiple (8500) Excel Files from one folder to SAS OnDemand for Academics</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Import-mutiple-8500-Excel-Files-from-one-folder-to-SAS-OnDemand/m-p/731849#M9914</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm struggling with importing multiple Excel Files into SAS onDemand for Academics.&lt;/P&gt;&lt;P&gt;I'm using the Robintrack dataset and havelaready unpacked it on my PC. Now I have 8597 Excel files in my PC folder, which are all named according to the respective stock.&lt;/P&gt;&lt;P&gt;Can someone help me to write an Macro to import all Excel files into one SAS table with an additional Variable which has the stockname in it?&lt;BR /&gt;To import one file is not a problem but I'm not able to import all files at once in a macro, too save them all in one SAS table and to give assigne them a new variable which has the corresponding stock name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!!!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="student12345678_1-1617793269930.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/57038iEE79DD6CE9CDDCB5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="student12345678_1-1617793269930.png" alt="student12345678_1-1617793269930.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="student12345678_0-1617793222382.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/57037i47E668454313C7D0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="student12345678_0-1617793222382.png" alt="student12345678_0-1617793222382.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 11:02:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Import-mutiple-8500-Excel-Files-from-one-folder-to-SAS-OnDemand/m-p/731849#M9914</guid>
      <dc:creator>student12345678</dc:creator>
      <dc:date>2021-04-07T11:02:44Z</dc:date>
    </item>
    <item>
      <title>SAS Studio Visual Programmer - Pass values to next task in process flow</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SAS-Studio-Visual-Programmer-Pass-values-to-next-task-in-process/m-p/730985#M9913</link>
      <description>&lt;P&gt;I've started learning how to write Custom Tasks.&amp;nbsp; I Wrote a Task to create a library in the process flow. I'd like to pass the name of the library to the next connected Custom Task in my process flow.&amp;nbsp; I am on SAS Studio v3.71 so I cannot yet use the DefaultValue option in DataSources.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The documentation on writing Custom Tasks does not clearly explain if Tasks in a process flow can be configured to pass tasks to downstream tasks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 14:33:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SAS-Studio-Visual-Programmer-Pass-values-to-next-task-in-process/m-p/730985#M9913</guid>
      <dc:creator>csteiz</dc:creator>
      <dc:date>2021-04-02T14:33:31Z</dc:date>
    </item>
    <item>
      <title>select all varchar variables in SAS Viya</title>
      <link>https://communities.sas.com/t5/SAS-Studio/select-all-varchar-variables-in-SAS-Viya/m-p/729915#M9910</link>
      <description>&lt;P&gt;Hello experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to select all Varchar variables in CAS table using datastep in Viya?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;initially I thought to use array: test[*]&amp;nbsp; _varchar_ but it didn't work.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Mar 2021 00:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/select-all-varchar-variables-in-SAS-Viya/m-p/729915#M9910</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2021-03-30T00:48:14Z</dc:date>
    </item>
    <item>
      <title>SAS Studio Enterprise Edition Email Issue</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SAS-Studio-Enterprise-Edition-Email-Issue/m-p/727941#M9908</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Last week we installed SAS&amp;nbsp; Office Analytics on a Linux ( RHEL 8.3)&amp;nbsp; Test Server . This also includes the SAS Studio Mid-Tier(Enterprise Edition)..&amp;nbsp; The Studio has been configured for PUBLIC Users.&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="pchegoor1_1-1616271523785.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56191iC0CD5335F9103AA7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pchegoor1_1-1616271523785.png" alt="pchegoor1_1-1616271523785.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to login and use SAS Studio but the moment i try to email the Results ( using the SAS Studio email feature under Results tab)&amp;nbsp; i get the below&amp;nbsp; Error after I click on SEND .&amp;nbsp; I&amp;nbsp; believe the&amp;nbsp; email settings are correct. But i am&amp;nbsp; &amp;nbsp;not sure how to go about fixing this&amp;nbsp; Error .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the&amp;nbsp; SAS Studio Log :&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;SASStudioMidTier3.81.log&lt;/STRONG&gt;&amp;nbsp; i do see this Error at the bottom of the log at the time i am trying to send email .&amp;nbsp; &amp;nbsp;The XXXXX&amp;nbsp; &amp;nbsp;is the user id i am using to log into SAS&amp;nbsp; Studio&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[tomcat-http--6] ERROR [unknown(XXXXX)] com.sas.ep.sascoder.web.ShareController - java.lang.NullPointerException&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="pchegoor1_0-1616270482447.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56190i080CBB55F64A60B1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pchegoor1_0-1616270482447.png" alt="pchegoor1_0-1616270482447.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any&amp;nbsp; thoughts&amp;nbsp; and suggestions?&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Mar 2021 18:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SAS-Studio-Enterprise-Edition-Email-Issue/m-p/727941#M9908</guid>
      <dc:creator>pchegoor1</dc:creator>
      <dc:date>2021-03-21T18:51:50Z</dc:date>
    </item>
    <item>
      <title>About proc arima:how can i get the picture like this</title>
      <link>https://communities.sas.com/t5/SAS-Studio/About-proc-arima-how-can-i-get-the-picture-like-this/m-p/726608#M9901</link>
      <description>&lt;P&gt;code:&lt;/P&gt;&lt;PRE&gt;data example2_1;&lt;BR /&gt;input freq@@;&lt;BR /&gt;cards;&lt;BR /&gt;1  2  3  4  5  6  7  8  9  10&lt;BR /&gt;11 12 13 14 15 16 17 18 19 20&lt;BR /&gt;;&lt;BR /&gt;proc arima data=example2_1;&lt;BR /&gt;identify var=freq NLAG=6;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;the outcome in SAS studio:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="屏幕截图 2021-03-16 110240.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55982iA170D772844C6958/image-size/large?v=v2&amp;amp;px=999" role="button" title="屏幕截图 2021-03-16 110240.jpg" alt="屏幕截图 2021-03-16 110240.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but i would like to have the picture like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55983i5F1BAF1274BE352E/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.jpg" alt="2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;is there any method?help me,please&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 03:04:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/About-proc-arima-how-can-i-get-the-picture-like-this/m-p/726608#M9901</guid>
      <dc:creator>AmandaW</dc:creator>
      <dc:date>2021-03-16T03:04:56Z</dc:date>
    </item>
    <item>
      <title>Does not exist error creating output with Proc SGPie from SAS/Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Does-not-exist-error-creating-output-with-Proc-SGPie-from-SAS/m-p/725542#M9895</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to use proc sgpie within SAS/Studio (3.8 &amp;amp;SAS&amp;nbsp;&lt;SPAN&gt;9.04.01M6P110718)&lt;/SPAN&gt;.&amp;nbsp; I'm sure it's probably a simple setup step I've missed to get graphics output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried various examples and keep getting this same error.&amp;nbsp;&amp;nbsp; I'm sure it's probably a simple setup step I've missed to get graphics output.&lt;/P&gt;&lt;P&gt;Here's an example from&amp;nbsp;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2018/11/26/the-sgpie-procedure/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2018/11/26/the-sgpie-procedure/&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value $type
  'Sedan'='Sedan'
  other= 'Other';
run;

ods graphics / reset width=4in height=2.5in;
title 'Vehicle Distribution';
proc sgpie data=sashelp.cars;
    format type $type.;
    styleattrs datacolors=(gold maroon);
    pie type / startangle=270;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Log output:&lt;CODE class=" language-sas"&gt;&lt;/CODE&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;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: ODS statements in the SAS Studio environment may disable some output features.
 71         
 72         proc format;
 73         value $type
 74           'Sedan'='Sedan'
 75           other= 'Other';
 NOTE: Format $TYPE has been output.
 76         run;
 
 NOTE: PROCEDURE FORMAT used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 77         
 78         ods graphics / reset width=4in height=2.5in;
 79         title 'Vehicle Distribution';
 80         proc sgpie data=sashelp.cars;
 81             format type $type.;
 82             styleattrs datacolors=(gold maroon);
 83             pie type / startangle=270;
 84         run;
 
 NOTE: The SGPIE procedure is pre-production for this release.
 ERROR: Path "/var/tmp/saswork/SAS_work644500006EE0_sassvr01/#LN00218" does not exist.
 NOTE: PROCEDURE SGPIE used (Total process time):
       real time           0.14 seconds
       cpu time            0.04 seconds
       
 ERROR: The file /var/tmp/saswork/SAS_work644500006EE0_sassvr01/_7F7C41BB5B02C4A8FA9058EC606E942.svg does not 
        exist.
 ERROR: The file /var/tmp/saswork/GBR/SAS_work644500006EE0_sassvr01/_85F370F91D7F94ABB0E6874F94AF844.svg does not 
        exist.
 NOTE: There were 428 observations read from the data set SASHELP.CARS.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 18:02:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Does-not-exist-error-creating-output-with-Proc-SGPie-from-SAS/m-p/725542#M9895</guid>
      <dc:creator>JonathanWilliamson</dc:creator>
      <dc:date>2021-03-11T18:02:05Z</dc:date>
    </item>
    <item>
      <title>how to programatically create a folder in SAS Studio / SAS Viya</title>
      <link>https://communities.sas.com/t5/SAS-Studio/how-to-programatically-create-a-folder-in-SAS-Studio-SAS-Viya/m-p/725075#M9886</link>
      <description>&lt;P&gt;I'm trying to write a program to create a folder in the sas studio folder structure. So far I've tried DCREATE and&amp;nbsp;options DLCREATEDIR without success:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data _null;
newdir=dcreate('newsubfolder','/path/that/exists');
run;&lt;/PRE&gt;
&lt;P&gt;this resulted in:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;NOTE: The data set WORK._NULL has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/PRE&gt;
&lt;P&gt;But no folder was created in '/path/that/exists'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I tried:&lt;/P&gt;
&lt;PRE&gt;options DLCREATEDIR;
libname newdir '/path/that/exists/newsubfolder';&lt;/PRE&gt;
&lt;P&gt;this got me an error:&lt;/P&gt;
&lt;PRE&gt;ERROR: Create of library NEWDIR failed.
ERROR: Error in the LIBNAME statement.&lt;/PRE&gt;
&lt;P&gt;Is there a way I can do this?&lt;/P&gt;
&lt;P&gt;I should say I do not have CAS available in my sas viya implementation, not sure if this is relevant but it has limited me in many ways before so maybe this is another one.&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 09:00:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/how-to-programatically-create-a-folder-in-SAS-Studio-SAS-Viya/m-p/725075#M9886</guid>
      <dc:creator>alexandravieira</dc:creator>
      <dc:date>2021-03-10T09:00:03Z</dc:date>
    </item>
    <item>
      <title>mean of 2 variables for rank groups</title>
      <link>https://communities.sas.com/t5/SAS-Studio/mean-of-2-variables-for-rank-groups/m-p/725012#M9885</link>
      <description>&lt;P&gt;I have a dataset with 4 variables where var 1 is categorical. I'm trying to do the mean for var2 and var3 based on a proc rank i applied on a 3rd variable(Thus, i the want the mean var2 for 0,1,2,3 as well as the mean for var3 for each of them as well. How can I do that???&lt;/P&gt;&lt;P&gt;I tried doing proc means but it's giving me the mean for each variable in general not for each value of the ranks.&lt;/P&gt;&lt;P&gt;my code looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data myd1;&lt;/P&gt;&lt;P&gt;input var1 var2 var3 var4;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1 200 300 55%&lt;/P&gt;&lt;P&gt;2 400 750 20%&lt;/P&gt;&lt;P&gt;3 400 400 90%&lt;/P&gt;&lt;P&gt;4 800 320 98%&lt;/P&gt;&lt;P&gt;5 500 200 80%&lt;/P&gt;&lt;P&gt;6 600 400 71%&lt;/P&gt;&lt;P&gt;7 900 900 22%&lt;/P&gt;&lt;P&gt;8 1000 9580 77%&lt;/P&gt;&lt;P&gt;9 100 3000 42%&lt;/P&gt;&lt;P&gt;10 760 1750 53%&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;proc rank data=myd1 groups=4 out=want;&lt;BR /&gt;var var4;&lt;BR /&gt;ranks groups;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;---------------------------&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 23:42:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/mean-of-2-variables-for-rank-groups/m-p/725012#M9885</guid>
      <dc:creator>jundy19</dc:creator>
      <dc:date>2021-03-09T23:42:23Z</dc:date>
    </item>
    <item>
      <title>Can I combine proc ranks with proc format then save it into a new dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Can-I-combine-proc-ranks-with-proc-format-then-save-it-into-a/m-p/724945#M9881</link>
      <description>&lt;P&gt;I have a dataset that i need to find the quartiles for one variable then change the numbers of the quartiles into words (assign low to 0, mid-low to 1, etc...). I am not sure how to combine both and then save it to a new dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data mydata;&lt;/P&gt;&lt;P&gt;input var1 income population percentage;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1 500 60 100%&lt;/P&gt;&lt;P&gt;2 400 70 90%&lt;/P&gt;&lt;P&gt;3 400 100 80%&lt;/P&gt;&lt;P&gt;4 800 222 80%&lt;/P&gt;&lt;P&gt;5 500 100 75%&lt;/P&gt;&lt;P&gt;6 600 213 70%&lt;/P&gt;&lt;P&gt;7 900 900 60%&lt;/P&gt;&lt;P&gt;8 1000 909 50%&lt;/P&gt;&lt;P&gt;9 100 600 40%&lt;/P&gt;&lt;P&gt;10 760 235 20%&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc rank data=mydata groups=4 out=want;&lt;BR /&gt;var percentage;&lt;BR /&gt;ranks quartiles;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried adding the proc format to the variable quartiles but i failed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 18:52:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Can-I-combine-proc-ranks-with-proc-format-then-save-it-into-a/m-p/724945#M9881</guid>
      <dc:creator>jude1</dc:creator>
      <dc:date>2021-03-09T18:52:33Z</dc:date>
    </item>
    <item>
      <title>Calculate quartiles and assign them to if then statement</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Calculate-quartiles-and-assign-them-to-if-then-statement/m-p/724919#M9873</link>
      <description>&lt;P&gt;I'm trying to find the quartiles for a variable in my data set, then create a new variable that takes different values depending on the quartile.&amp;nbsp;&lt;/P&gt;&lt;P&gt;4 if the percentage for&amp;nbsp; var1 is greater than the third quartile&lt;BR /&gt;3 if the percentage for&amp;nbsp; var1 is between the median &amp;amp; the third quartile&lt;BR /&gt;2 if the percentage for&amp;nbsp; var1 is between the first quartile &amp;amp; the median&lt;BR /&gt;1 if the percentage for&amp;nbsp; var1 is lower than the first quartile&lt;BR /&gt;. ( missing value) if the percentage is not given&lt;BR /&gt;Format the new_var to name the groups “high”, “med-high”, “med-low”, and “low”, respectively. Add a label to the variable as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my data looks like this:&lt;/P&gt;&lt;P&gt;data mydata;&lt;/P&gt;&lt;P&gt;input var1 income location percentage;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 500 ny 100%&lt;/P&gt;&lt;P&gt;2 400 nj 90%&lt;/P&gt;&lt;P&gt;3 400 ma 80%&lt;/P&gt;&lt;P&gt;4 800 va 80%&lt;/P&gt;&lt;P&gt;5 500 ca 75%&lt;/P&gt;&lt;P&gt;6 600 ma 70%&lt;/P&gt;&lt;P&gt;7 900 wv 60%&lt;/P&gt;&lt;P&gt;8 1000 ny 50%&lt;/P&gt;&lt;P&gt;9 100 pa 40%&lt;/P&gt;&lt;P&gt;10 760 wy 20%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 17:18:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Calculate-quartiles-and-assign-them-to-if-then-statement/m-p/724919#M9873</guid>
      <dc:creator>jude1</dc:creator>
      <dc:date>2021-03-09T17:18:07Z</dc:date>
    </item>
    <item>
      <title>how do I know the name of the program running in SAS Studio / SAS Viya?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/how-do-I-know-the-name-of-the-program-running-in-SAS-Studio-SAS/m-p/724801#M9869</link>
      <description>&lt;P&gt;Like &amp;amp;_CLIENTTASKLABEL in EG, that gave you the name of the .sas, is there such a thing for sas studio / sas viya?&lt;/P&gt;
&lt;P&gt;[edited] I did %put _all_; and couldn't find any macro variable with the program name. I'm not looking for a solution based on a macro var necessarily, I'm looking for any sort of solution&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 11:53:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/how-do-I-know-the-name-of-the-program-running-in-SAS-Studio-SAS/m-p/724801#M9869</guid>
      <dc:creator>alexandravieira</dc:creator>
      <dc:date>2021-03-09T11:53:39Z</dc:date>
    </item>
    <item>
      <title>Calculating duration for overlaps and non-overlaps  using  another method not macro</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Calculating-duration-for-overlaps-and-non-overlaps-using-another/m-p/724729#M9866</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;I would like to calculate durations &amp;nbsp;(jobyrout-jobyrin) for overlap and non overlap years without using macro.&lt;/P&gt;
&lt;P&gt;The macro didn’t work well with large datasets having long arrays; it worked&amp;nbsp; for a sample (small) dataset, so, I am obliged to find another method that will achieve the same aim, even if the method is long, I would prefer that to macro.&lt;/P&gt;
&lt;P&gt;I would appreciate if someone knows of any other method to achieve my aim. The dataset, my objectives and expected output &amp;nbsp;are given below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I really need help; I have no clue, please.&lt;/P&gt;
&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;/**Data set*/&lt;/P&gt;
&lt;P&gt;data full_tdata;&lt;BR /&gt;input id$ 1-6 job 7-8&amp;nbsp; jobyrin 9-11&amp;nbsp; jobyrout 18-20&amp;nbsp; icode$ 23-27 lung$ 29-35;&lt;BR /&gt;datalines;&lt;BR /&gt;OSa13&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; 73&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; 78&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 6191&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cacase&lt;BR /&gt;OSa30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; 39&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; 46&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 7181&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cacase&lt;BR /&gt;OSa30&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; 56&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; 64&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 6191&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cacase&lt;BR /&gt;OSa73&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; 23&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;31&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 7181&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; popcon&lt;BR /&gt;OSa73&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; 31&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; 42&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 5130&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; popcon&lt;BR /&gt;OSf26&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; 70&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; 70&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 6191&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; popcon&lt;BR /&gt;OSj17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; 60&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; 75&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 6191&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cacase&lt;BR /&gt;OSj17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; 65&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; 70&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 6191&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cacase&lt;/P&gt;
&lt;P&gt;OSj17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; 60&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; 75&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 6191&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cacase&lt;BR /&gt;OSj17&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; 65&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; 70&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 6191&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cacase&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Objectives&lt;/P&gt;
&lt;P&gt;1) No overlap at all &amp;nbsp;ie. .ids osa13 (duration=78-73=5) and osa30 (duration=46-39=7 for icode7181 and 64-56=8 for icode 6191).&lt;/P&gt;
&lt;P&gt;2) The END of the previous matches the START of the current ie. id osa73 ; duration=31-23=8 for icode 7181 and 42-31=11 for icode 5130.&lt;/P&gt;
&lt;P&gt;3) The START and END are the same &amp;nbsp;ie. osf26:&amp;nbsp; duration is automatically assigned 0.5 (70 to 70, not 0 but 0.5).&lt;/P&gt;
&lt;P&gt;4) The START AND END of current is between START and END of previous. Eg. osj 17 jobs 3 and 4.; duration will be from 60 to 75 (ie. 75-60=15).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expected output:&lt;/P&gt;
&lt;P&gt;id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; janitor_dur&amp;nbsp; &amp;nbsp; janitor_ever&amp;nbsp; &amp;nbsp;baker_dur&amp;nbsp; &amp;nbsp; &amp;nbsp; baker_ever&amp;nbsp; plumber_dur&amp;nbsp; &amp;nbsp; &amp;nbsp;plumber_ever&lt;BR /&gt;osa13&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&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;0 &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;0 &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;0&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;BR /&gt;osa30&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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;7&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;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;&amp;nbsp; 0&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;0&lt;BR /&gt;osa73&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8&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;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; 11&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;1&lt;BR /&gt;osf26&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; 0&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;0&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; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;BR /&gt;osj17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;15&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; 0&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;0&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; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Icode 6191=janitor: &amp;nbsp;if janitor(6191) is present (janitor_ever=1, otherwise janitor_ever=0) &amp;nbsp;; janitor_dur is the duration (jobyrout-jobyrin); &amp;nbsp;icode 7181=baker, 5130=plumber.&lt;/P&gt;
&lt;P&gt;1) No overlap at all &amp;nbsp;ie. .ids osa13 (duration=78-73=5) and osa30 (duration=46-39=7 for icode7181 and 64-56=8 for icode 6191).&lt;/P&gt;
&lt;P&gt;2) The END of the previous matches the START of the current ie. id osa73 ; duration=31-23=8 for icode 7181 and 42-31=11 for icode 5130.&lt;/P&gt;
&lt;P&gt;3) The START and END are the same &amp;nbsp;ie. osf26:&amp;nbsp; duration is automatically assigned 0.5 (70 to 70, not 0 but 0.5).&lt;/P&gt;
&lt;P&gt;4) The START AND END of current is between START and END of previous. Eg. osj 17 jobs 3 and 4.; duration will be from 60 to 75 (ie. 75-60=15).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks very much in advance for your assistance.&lt;/P&gt;
&lt;P&gt;ak.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 01:14:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Calculating-duration-for-overlaps-and-non-overlaps-using-another/m-p/724729#M9866</guid>
      <dc:creator>ak2011</dc:creator>
      <dc:date>2021-03-09T01:14:28Z</dc:date>
    </item>
    <item>
      <title>Merge 2 datasets and get 3 outputs</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Merge-2-datasets-and-get-3-outputs/m-p/724615#M9859</link>
      <description>&lt;P&gt;I am trying to merge the 2 datasets by var1 and create 3 datasets outputs, one that has var1 in both, one that has var1 with no income, one that has var1 with no grad_year&lt;/P&gt;&lt;P&gt;the data looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data mydata;&lt;/P&gt;&lt;P&gt;input var1 income;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1 400&lt;/P&gt;&lt;P&gt;2 500&lt;/P&gt;&lt;P&gt;3 500&lt;/P&gt;&lt;P&gt;7 600&lt;/P&gt;&lt;P&gt;8 900&lt;/P&gt;&lt;P&gt;9 1000&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data mydata2;&lt;/P&gt;&lt;P&gt;var1 grad_year&lt;/P&gt;&lt;P&gt;1 2018&lt;/P&gt;&lt;P&gt;2 2019&lt;/P&gt;&lt;P&gt;4 2020&amp;nbsp;&lt;/P&gt;&lt;P&gt;5 2019&amp;nbsp;&lt;/P&gt;&lt;P&gt;6 2017&lt;/P&gt;&lt;P&gt;11 2019&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;merging is not an issue for me. I think i should use the 'if then output' statement for this but i could not figure it out.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 19:47:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Merge-2-datasets-and-get-3-outputs/m-p/724615#M9859</guid>
      <dc:creator>jude1</dc:creator>
      <dc:date>2021-03-08T19:47:02Z</dc:date>
    </item>
    <item>
      <title>Uexpected merged results from two macro datasets</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Uexpected-merged-results-from-two-macro-datasets/m-p/724097#M9851</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Thanks to all who provided solutions/comments to my question of merging two macro results. However, the problem has still not been solved, so I would appreciate if someone could help me.&lt;/P&gt;
&lt;P&gt;I am reposting the same question. The unexpected merged results (17 observations) this time is given for your perusal.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;In my previous posts,I mentioned that I wanted to merge 2 macro results datasets :Table 1 (janitor)&lt;BR /&gt;and Table 2 (Baker). Janitor dataset is called jan and baker is bake.&lt;BR /&gt;The merged file mjb produced unexpected results (Table 3-17 observations).&lt;BR /&gt;I have still not found the solution to&lt;BR /&gt;my problem inspite of reading extensively on the subject from SAS Forum answers, SAS online documentation and so on.&lt;BR /&gt;I would appreciate your help,please.&lt;BR /&gt;&lt;BR /&gt;My code, data and results are found below. My expected output is placed after results.&lt;BR /&gt;Thanks in advance. [The log has no errors but too long so not shown].&lt;BR /&gt;ak.&lt;/P&gt;
&lt;PRE&gt;/**MACRO*/&lt;BR /&gt;&lt;BR /&gt;data full_tdata;&lt;BR /&gt;input id$ 1-6 job 7-8 jobyrin 9-11 jobyrout 18-20  icode$ 23-27  lung$ 29-35;&lt;BR /&gt;datalines;&lt;BR /&gt;OSa13	3	73	      78	  6191	 cacase&lt;BR /&gt;OSa30	1	39	      46	  7181	 cacase&lt;BR /&gt;OSa30	3	56	      64	  6191	 cacase&lt;BR /&gt;OSa73	1	23	      31	  7181	 popcon&lt;BR /&gt;OSa73	2	31	      42	  5130	 popcon&lt;BR /&gt;OSa86	3	46	      60	  6198	 cacon&lt;BR /&gt;OSa86	4	60	      70	  5130	 cacon&lt;BR /&gt;OSa93	3	68	      72	  6121	 popcon&lt;BR /&gt;OSf26	1	54	      54	  6198	 popcon&lt;BR /&gt;OSf26	2	70	      70	  6191	 popcon&lt;BR /&gt;OSh77	1	63	      66	  6121	 cacon&lt;BR /&gt;OSh77	2	66	      70	  6121	 cacon&lt;BR /&gt;OSh77	3	70	      71	  6121	 cacon&lt;BR /&gt;OSi84	1	67	      75	  6191	 cacase&lt;BR /&gt;OSi84	2	75	      81	  6191	 cacase&lt;BR /&gt;OSj17	3	60	      75	  6191	 cacase&lt;BR /&gt;OSj17	4	65	      70	  6191	 cacase&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;proc print data=full_tdata;&lt;BR /&gt;title 'Table O: Original full_tdata file'; run;&lt;BR /&gt;&lt;BR /&gt;data small_tdata; set full_tdata; drop lung;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*max 4 jobs per subject;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;%macro duration(database=small_tdata, icode=6191, Job_title=janitor);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*Creating a dataset containing all the jobs with selected icode;&lt;BR /&gt;&lt;BR /&gt;data &amp;amp;Job_title;&lt;BR /&gt;set &amp;amp;database;&lt;BR /&gt;if icode = &amp;amp;icode;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*transposing dataset so that the YEARIN and YEAROUT of all jobs held by a subject are in the same row;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*YEARIN;&lt;BR /&gt;&lt;BR /&gt;proc transpose data = &amp;amp;Job_title out = &amp;amp;Job_title._yearin prefix = YEARIN;&lt;BR /&gt;by ID;&lt;BR /&gt;var jobyrin;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sort data = &amp;amp;Job_title._yearin;&lt;BR /&gt;by id;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;*YEAROUT;&lt;BR /&gt;&lt;BR /&gt;proc transpose data = &amp;amp;Job_title out = &amp;amp;Job_title._yearout prefix = YEAROUT;&lt;BR /&gt;by ID;&lt;BR /&gt;var jobyrout;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sort data = &amp;amp;Job_title._yearout;&lt;BR /&gt;by id;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data &amp;amp;Job_title._final;&lt;BR /&gt;merge &amp;amp;Job_title._yearin &amp;amp;Job_title._yearout;&lt;BR /&gt;by ID;&lt;BR /&gt;&lt;BR /&gt;array YEARIN (3) YEARIN1 YEARIN2 YEARIN3;&lt;BR /&gt;array YEAROUT (3) YEAROUT1 YEAROUT2 YEAROUT3;&lt;BR /&gt;&lt;BR /&gt;array YEARINv2 (3) YEARIN2 YEARIN3 YEARIN4 ;&lt;BR /&gt;array YEAROUTv2 (3) YEAROUT2 YEAROUT3 YEAROUT4;&lt;BR /&gt;&lt;BR /&gt;array YEARIN_F (4) YEARIN1 YEARIN2 YEARIN3 YEARIN4;&lt;BR /&gt;array YEAROUT_F (4) YEAROUT1 YEAROUT2 YEAROUT3 YEAROUT4;&lt;BR /&gt;&lt;BR /&gt;Array duration (4) Dur1 Dur2 Dur3 Dur4;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;do i = 1 to 3;&lt;BR /&gt;&lt;BR /&gt;if yearin(i) ne . and  yearinv2(i) ne . and yearinv2(i) le yearout(i) and yearoutv2(i) ge yearout(i) then do; yearinv2(i) = yearin(i); yearin(i) = .;yearout(i) = .;end;&lt;BR /&gt;else if  yearin(i) ne . and  yearinv2(i) ne . and yearinv2(i) le yearout(i) and yearoutv2(i) lt yearout(i) then do; yearinv2(i) = yearin(i);yearoutv2(i) = yearout(i); yearin(i) = .;yearout(i) = .;end;&lt;BR /&gt;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;do i = 1 to 4;&lt;BR /&gt;&lt;BR /&gt;if YEARIN_F(i) = . then  YEARIN_F(i) = 0;&lt;BR /&gt;if YEAROUT_F(i) = . then  YEAROUT_F(i) = 0;&lt;BR /&gt;&lt;BR /&gt;duration(i) = YEAROUT_F(i) - YEARIN_F(i);&lt;BR /&gt;if YEARIN_F(i) ne 0 and YEAROUT_F(i) = YEARIN_F(i) then duration(i) = 0.5;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;&amp;amp;Job_title._dur = Dur1 + Dur2 + Dur3 + Dur4;&lt;BR /&gt;&lt;BR /&gt;&amp;amp;Job_title._ever = 1;&lt;BR /&gt;&lt;BR /&gt;keep ID &amp;amp;Job_title._dur &amp;amp;Job_title._ever;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;%MEND duration;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/* 1st macro-janitor icode 6191*/&lt;BR /&gt;&lt;BR /&gt;data jan; set small_tdata;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;%duration(database=small_tdata, icode=6191, Job_title=janitor);&lt;BR /&gt;  &lt;BR /&gt;&lt;BR /&gt;proc print; &lt;BR /&gt;title 'Table 1: janitor records';&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/* 2nd macro-baker icode 7181*/&lt;BR /&gt;&lt;BR /&gt;data bake; set small_tdata;&lt;BR /&gt; &lt;BR /&gt;%duration(database=small_tdata,icode=7181, Job_title=baker);&lt;BR /&gt;&lt;BR /&gt;proc print; &lt;BR /&gt;title 'Table 2: baker records';&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/*Merging the janitor (Table 1) and baker(Table 2) files*/&lt;BR /&gt;&lt;BR /&gt;proc sort data=jan; by id;&lt;BR /&gt;&lt;BR /&gt;proc sort data=bake; by id;&lt;BR /&gt;&lt;BR /&gt;data mjb; merge  jan bake; by id; run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc print data=mjb;&lt;BR /&gt;Title 'Table 3: Merged Table 1(janitor) and Table 2 (baker)-Unexpected merge&lt;BR /&gt;This is not what I want';&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;Table O: Original full_tdata file&lt;/P&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TD colspan="7"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;Obs&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;id&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;job&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;jobyrin&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;jobyrout&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;icode&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;lung&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa13&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;73&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;78&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;6191&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;cacase&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa30&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;39&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;46&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;7181&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;cacase&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa30&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;56&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;64&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;6191&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;cacase&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa73&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;23&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;31&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;7181&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;popcon&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa73&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;31&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;42&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;5130&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;popcon&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;6&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa86&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;46&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;60&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;6198&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;cacon&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa86&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;4&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;60&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;70&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;5130&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;cacon&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;8&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa93&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;68&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;72&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;6121&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;popcon&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;9&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSf26&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;54&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;54&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;6198&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;popcon&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSf26&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;70&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;70&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;6191&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;popcon&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;11&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSh77&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;63&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;66&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;6121&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;cacon&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;12&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSh77&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;66&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;70&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;6121&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;cacon&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;13&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSh77&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;70&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;71&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;6121&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;cacon&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;14&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSi84&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;67&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;75&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;6191&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;cacase&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;15&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSi84&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;75&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;81&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;6191&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;cacase&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;16&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSj17&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;60&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;75&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;6191&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;cacase&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;17&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSj17&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;4&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;65&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;70&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;6191&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;cacase&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table 1: janitor records&lt;/P&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TD colspan="4"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;Obs&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;id&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;janitor_dur&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;janitor_ever&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa13&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;5.0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa30&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;8.0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSf26&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;0.5&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSi84&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;14.0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSj17&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;15.0&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table 2: baker records&lt;/P&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TD colspan="4"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;Obs&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;id&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;baker_dur&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;baker_ever&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa30&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;7&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa73&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;8&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table 3: Merged Table 1(janitor) and Table 2 (baker)-Unexpected mergeThis is not what I want&lt;/P&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TD colspan="5"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;Obs&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;id&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;job&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;jobyrin&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;jobyrout&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa13&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;73&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;78&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa30&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;39&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;46&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa30&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;56&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;64&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa73&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;23&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;31&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa73&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;31&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;42&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;6&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa86&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;46&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;60&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa86&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;4&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;60&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;70&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;8&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSa93&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;68&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;72&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;9&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSf26&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;54&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;54&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSf26&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;70&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;70&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;11&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSh77&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;63&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;66&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;12&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSh77&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;66&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;70&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;13&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSh77&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;70&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;71&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;14&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSi84&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;67&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;75&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;15&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSi84&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;75&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;81&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;16&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSj17&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;60&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;75&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;&lt;STRONG&gt;17&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;OSj17&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;4&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;65&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;70&lt;/P&gt;
&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; &amp;nbsp;Expected output:&lt;/P&gt;
&lt;P&gt;id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; janitor_dur&amp;nbsp; &amp;nbsp; janitor_ever&amp;nbsp; &amp;nbsp;baker_dur&amp;nbsp; &amp;nbsp; &amp;nbsp; baker_ever&lt;BR /&gt;osa13&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&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;0&lt;BR /&gt;osa30&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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;7&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;1&lt;BR /&gt;osa73&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&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;1&lt;BR /&gt;osf26&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; 0&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;0&lt;BR /&gt;osi84&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;14&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; 0&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;0&lt;BR /&gt;osj17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;15&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; 0&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;0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tables 1 and 2 are ok, Table 3 is not good: My aim is to merge Tables 1 and 2 to obtain the expected output above.&lt;/P&gt;
&lt;P&gt;I would finally merge janitor and baker files (merged Tables 1&amp;amp;2) with table 0: original file.&lt;/P&gt;
&lt;P&gt;Please help. Thanks.&lt;/P&gt;
&lt;P&gt;ak.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 23:45:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Uexpected-merged-results-from-two-macro-datasets/m-p/724097#M9851</guid>
      <dc:creator>ak2011</dc:creator>
      <dc:date>2021-03-05T23:45:07Z</dc:date>
    </item>
    <item>
      <title>Error message: One or more variables are missing or freq or weight is zero on every observation</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Error-message-One-or-more-variables-are-missing-or-freq-or/m-p/723764#M9844</link>
      <description>&lt;P&gt;Hi all, could you please correct my input, as I got this message, and no results&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;DATA MD1;&lt;BR /&gt;INPUT I R RL;&lt;BR /&gt;CARDS;&lt;BR /&gt;1 1 13&lt;BR /&gt;1 2 12&lt;BR /&gt;1 3 9&lt;BR /&gt;2 1 7&lt;BR /&gt;2 2 5&lt;BR /&gt;2 3 9&lt;BR /&gt;3 1 5&lt;BR /&gt;3 2 4&lt;BR /&gt;3 3 6&lt;BR /&gt;8 1 5&lt;BR /&gt;8 2 5&lt;BR /&gt;8 3 5&lt;BR /&gt;;&lt;BR /&gt;PROC ANOVA;&lt;BR /&gt;CLASS I R;&lt;BR /&gt;MODEL RL = I R;&lt;BR /&gt;MEANS I / LSD;&lt;BR /&gt;MEANS I /TUKEY;&lt;BR /&gt;MEANS I / DUNCAN;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;&lt;STRONG&gt;LOG&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;73 DATA MD1;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74 INPUT I R RL;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75 CARDS;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data for I in line 76 1-6.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data for R in line 77 1-6.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data for RL in line 78 1-5.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;78 CHAR 1.3.9&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;ZONE 30303222222222222222222222222222222222222222222222222222222222222222222222222222&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;NUMR 19399000000000000000000000000000000000000000000000000000000000000000000000000000&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data errors for file CARDS occurred outside the printed range.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;I=. R=. RL=. _ERROR_=1 _N_=1&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data for I in line 79 1-5.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data for R in line 80 1-5.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data for RL in line 81 1-5.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;81 CHAR 2.3.9&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;ZONE 30303222222222222222222222222222222222222222222222222222222222222222222222222222&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;NUMR 29399000000000000000000000000000000000000000000000000000000000000000000000000000&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data errors for file CARDS occurred outside the printed range.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;I=. R=. RL=. _ERROR_=1 _N_=2&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data for I in line 82 1-5.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data for R in line 83 1-5.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data for RL in line 84 1-5.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;84 CHAR 3.3.6&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;ZONE 30303222222222222222222222222222222222222222222222222222222222222222222222222222&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;NUMR 39396000000000000000000000000000000000000000000000000000000000000000000000000000&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data errors for file CARDS occurred outside the printed range.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;I=. R=. RL=. _ERROR_=1 _N_=3&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data for I in line 85 1-5.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data for R in line 86 1-5.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data for RL in line 87 1-5.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;87 CHAR 8.3.5&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;ZONE 30303222222222222222222222222222222222222222222222222222222222222222222222222222&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;NUMR 89395000000000000000000000000000000000000000000000000000000000000000000000000000&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Invalid data errors for file CARDS occurred outside the printed range.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Increase available buffer lines with the INFILE n= option.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;I=. R=. RL=. _ERROR_=1 _N_=4&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The data set WORK.MD1 has 4 observations and 3 variables.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;88 ;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;89 PROC ANOVA;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;90 CLASS I R;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;91 MODEL RL = I R;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;92 MEANS I / LSD;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;93 MEANS I /TUKEY;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;94 MEANS I / DUNCAN;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;95 RUN;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: One or more variables are missing or freq or weight is zero on every observation.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;96&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;97 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;109&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 05:07:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Error-message-One-or-more-variables-are-missing-or-freq-or/m-p/723764#M9844</guid>
      <dc:creator>Mohannad</dc:creator>
      <dc:date>2021-03-05T05:07:47Z</dc:date>
    </item>
    <item>
      <title>Merging two separate macro results</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Merging-two-separate-macro-results/m-p/723744#M9842</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;In my previous post,I mentioned that I wanted to merge 2 macro results datasets :Table 1 (janitor)&lt;BR /&gt;and Table 2 (Baker). Janitor dataset is called jan and baker is bake.&lt;BR /&gt;The merged file mjb produced unexpected results (Table 3,not shown-Is the small_tdata set from which&lt;BR /&gt;the macro was developed(17 observations) &lt;BR /&gt;I have still not found the solution to&lt;BR /&gt;my problem inspite of reading extensively on the subject from SAS Forum answers, SAS online documentation&lt;BR /&gt;and so on. &lt;BR /&gt;I would appreciate your help,please.&lt;BR /&gt;&lt;BR /&gt;My code, data and results are found below. My expected output is placed after results.&lt;BR /&gt;Thanks in advance. [The log has no errors but too long so not shown].&lt;BR /&gt;ak.&lt;/P&gt;
&lt;PRE&gt;/**MACRO*/&lt;BR /&gt;&lt;BR /&gt;data full_tdata;&lt;BR /&gt;input id$ 1-6 job 7-8 jobyrin 9-11 jobyrout 18-20  icode$ 23-27  lung$ 29-35;&lt;BR /&gt;datalines;&lt;BR /&gt;OSa13	3	73	      78	  6191	 cacase&lt;BR /&gt;OSa30	1	39	      46	  7181	 cacase&lt;BR /&gt;OSa30	3	56	      64	  6191	 cacase&lt;BR /&gt;OSa73	1	23	      31	  7181	 popcon&lt;BR /&gt;OSa73	2	31	      42	  5130	 popcon&lt;BR /&gt;OSa86	3	46	      60	  6198	 cacon&lt;BR /&gt;OSa86	4	60	      70	  5130	 cacon&lt;BR /&gt;OSa93	3	68	      72	  6121	 popcon&lt;BR /&gt;OSf26	1	54	      54	  6198	 popcon&lt;BR /&gt;OSf26	2	70	      70	  6191	 popcon&lt;BR /&gt;OSh77	1	63	      66	  6121	 cacon&lt;BR /&gt;OSh77	2	66	      70	  6121	 cacon&lt;BR /&gt;OSh77	3	70	      71	  6121	 cacon&lt;BR /&gt;OSi84	1	67	      75	  6191	 cacase&lt;BR /&gt;OSi84	2	75	      81	  6191	 cacase&lt;BR /&gt;OSj17	3	60	      75	  6191	 cacase&lt;BR /&gt;OSj17	4	65	      70	  6191	 cacase&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;proc print data=full_tdata;&lt;BR /&gt;title 'Table O: Original full_tdata file'; run;&lt;BR /&gt;&lt;BR /&gt;data small_tdata; set full_tdata; drop lung;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*max 4 jobs per subject;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;%macro duration(database=small_tdata, icode=6191, Job_title=janitor);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*Creating a dataset containing all the jobs with selected icode;&lt;BR /&gt;&lt;BR /&gt;data &amp;amp;Job_title;&lt;BR /&gt;set &amp;amp;database;&lt;BR /&gt;if icode = &amp;amp;icode;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*transposing dataset so that the YEARIN and YEAROUT of all jobs held by a subject are in the same row;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*YEARIN;&lt;BR /&gt;&lt;BR /&gt;proc transpose data = &amp;amp;Job_title out = &amp;amp;Job_title._yearin prefix = YEARIN;&lt;BR /&gt;by ID;&lt;BR /&gt;var jobyrin;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sort data = &amp;amp;Job_title._yearin;&lt;BR /&gt;by id;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;*YEAROUT;&lt;BR /&gt;&lt;BR /&gt;proc transpose data = &amp;amp;Job_title out = &amp;amp;Job_title._yearout prefix = YEAROUT;&lt;BR /&gt;by ID;&lt;BR /&gt;var jobyrout;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sort data = &amp;amp;Job_title._yearout;&lt;BR /&gt;by id;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data &amp;amp;Job_title._final;&lt;BR /&gt;merge &amp;amp;Job_title._yearin &amp;amp;Job_title._yearout;&lt;BR /&gt;by ID;&lt;BR /&gt;&lt;BR /&gt;array YEARIN (3) YEARIN1 YEARIN2 YEARIN3;&lt;BR /&gt;array YEAROUT (3) YEAROUT1 YEAROUT2 YEAROUT3;&lt;BR /&gt;&lt;BR /&gt;array YEARINv2 (3) YEARIN2 YEARIN3 YEARIN4 ;&lt;BR /&gt;array YEAROUTv2 (3) YEAROUT2 YEAROUT3 YEAROUT4;&lt;BR /&gt;&lt;BR /&gt;array YEARIN_F (4) YEARIN1 YEARIN2 YEARIN3 YEARIN4;&lt;BR /&gt;array YEAROUT_F (4) YEAROUT1 YEAROUT2 YEAROUT3 YEAROUT4;&lt;BR /&gt;&lt;BR /&gt;Array duration (4) Dur1 Dur2 Dur3 Dur4;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;do i = 1 to 3;&lt;BR /&gt;&lt;BR /&gt;if yearin(i) ne . and  yearinv2(i) ne . and yearinv2(i) le yearout(i) &lt;BR /&gt;and yearoutv2(i) ge yearout(i) then do; yearinv2(i) = yearin(i); yearin(i) = .;yearout(i) = .;end;&lt;BR /&gt;else if  yearin(i) ne . and  yearinv2(i) ne . and yearinv2(i) le yearout(i) &lt;BR /&gt;and yearoutv2(i) lt yearout(i) &lt;BR /&gt;then do; yearinv2(i) = yearin(i);yearoutv2(i) = yearout(i); yearin(i) = .;yearout(i) = .;end;&lt;BR /&gt;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;do i = 1 to 4;&lt;BR /&gt;&lt;BR /&gt;if YEARIN_F(i) = . then  YEARIN_F(i) = 0;&lt;BR /&gt;if YEAROUT_F(i) = . then  YEAROUT_F(i) = 0;&lt;BR /&gt;&lt;BR /&gt;duration(i) = YEAROUT_F(i) - YEARIN_F(i);&lt;BR /&gt;if YEARIN_F(i) ne 0 and YEAROUT_F(i) = YEARIN_F(i) then duration(i) = 0.5;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;&amp;amp;Job_title._dur = Dur1 + Dur2 + Dur3 + Dur4;&lt;BR /&gt;&lt;BR /&gt;&amp;amp;Job_title._ever = 1;&lt;BR /&gt;&lt;BR /&gt;keep ID &amp;amp;Job_title._dur &amp;amp;Job_title._ever;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;%MEND duration;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/* 1st macro-janitor icode 6191*/&lt;BR /&gt;&lt;BR /&gt;data jan; set small_tdata;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;%duration(database=small_tdata, icode=6191, Job_title=janitor);&lt;BR /&gt;  &lt;BR /&gt;&lt;BR /&gt;proc print; &lt;BR /&gt;title 'Table 1: janitor records';&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/* 2nd macro-baker icode 7181*/&lt;BR /&gt;&lt;BR /&gt;data bake; set small_tdata;&lt;BR /&gt; &lt;BR /&gt;%duration(database=small_tdata,icode=7181, Job_title=baker);&lt;BR /&gt;&lt;BR /&gt;proc print; &lt;BR /&gt;title 'Table 2: baker records';&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/*Merging the janitor (Table 1) and baker(Table 2) files*/&lt;BR /&gt;&lt;BR /&gt;proc sort data=jan; by id;&lt;BR /&gt;&lt;BR /&gt;proc sort data=bake; by id;&lt;BR /&gt;&lt;BR /&gt;data mjb; merge  jan bake; by id; run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc print data=mjb;&lt;BR /&gt;Title 'Table 3: Merged Table 1(janitor) and Table 2 (baker)-Unexpected merge';&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;SECTION data-name="Print" data-sec-type="proc"&gt;
&lt;DIV id="IDX" class="systitleandfootercontainer"&gt;
&lt;P&gt;&lt;SPAN class="c systemtitle"&gt;Table O: Original full_tdata file&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;ARTICLE aria-label="Data Set WORK.FULL_TDATA"&gt;
&lt;TABLE class="table" aria-label="Data Set WORK.FULL_TDATA"&gt;&lt;CAPTION aria-label="Data Set WORK.FULL_TDATA"&gt;&amp;nbsp;&lt;/CAPTION&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col"&gt;Obs&lt;/TH&gt;
&lt;TH class="header" scope="col"&gt;id&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;job&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;jobyrin&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;jobyrout&lt;/TH&gt;
&lt;TH class="header" scope="col"&gt;icode&lt;/TH&gt;
&lt;TH class="header" scope="col"&gt;lung&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;
&lt;TD class="data"&gt;OSa13&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;73&lt;/TD&gt;
&lt;TD class="r data"&gt;78&lt;/TD&gt;
&lt;TD class="data"&gt;6191&lt;/TD&gt;
&lt;TD class="data"&gt;cacase&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;2&lt;/TH&gt;
&lt;TD class="data"&gt;OSa30&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;39&lt;/TD&gt;
&lt;TD class="r data"&gt;46&lt;/TD&gt;
&lt;TD class="data"&gt;7181&lt;/TD&gt;
&lt;TD class="data"&gt;cacase&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;3&lt;/TH&gt;
&lt;TD class="data"&gt;OSa30&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;56&lt;/TD&gt;
&lt;TD class="r data"&gt;64&lt;/TD&gt;
&lt;TD class="data"&gt;6191&lt;/TD&gt;
&lt;TD class="data"&gt;cacase&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;4&lt;/TH&gt;
&lt;TD class="data"&gt;OSa73&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;23&lt;/TD&gt;
&lt;TD class="r data"&gt;31&lt;/TD&gt;
&lt;TD class="data"&gt;7181&lt;/TD&gt;
&lt;TD class="data"&gt;popcon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;5&lt;/TH&gt;
&lt;TD class="data"&gt;OSa73&lt;/TD&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;31&lt;/TD&gt;
&lt;TD class="r data"&gt;42&lt;/TD&gt;
&lt;TD class="data"&gt;5130&lt;/TD&gt;
&lt;TD class="data"&gt;popcon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;6&lt;/TH&gt;
&lt;TD class="data"&gt;OSa86&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;46&lt;/TD&gt;
&lt;TD class="r data"&gt;60&lt;/TD&gt;
&lt;TD class="data"&gt;6198&lt;/TD&gt;
&lt;TD class="data"&gt;cacon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;7&lt;/TH&gt;
&lt;TD class="data"&gt;OSa86&lt;/TD&gt;
&lt;TD class="r data"&gt;4&lt;/TD&gt;
&lt;TD class="r data"&gt;60&lt;/TD&gt;
&lt;TD class="r data"&gt;70&lt;/TD&gt;
&lt;TD class="data"&gt;5130&lt;/TD&gt;
&lt;TD class="data"&gt;cacon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;8&lt;/TH&gt;
&lt;TD class="data"&gt;OSa93&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;68&lt;/TD&gt;
&lt;TD class="r data"&gt;72&lt;/TD&gt;
&lt;TD class="data"&gt;6121&lt;/TD&gt;
&lt;TD class="data"&gt;popcon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;9&lt;/TH&gt;
&lt;TD class="data"&gt;OSf26&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;54&lt;/TD&gt;
&lt;TD class="r data"&gt;54&lt;/TD&gt;
&lt;TD class="data"&gt;6198&lt;/TD&gt;
&lt;TD class="data"&gt;popcon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;10&lt;/TH&gt;
&lt;TD class="data"&gt;OSf26&lt;/TD&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;70&lt;/TD&gt;
&lt;TD class="r data"&gt;70&lt;/TD&gt;
&lt;TD class="data"&gt;6191&lt;/TD&gt;
&lt;TD class="data"&gt;popcon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;11&lt;/TH&gt;
&lt;TD class="data"&gt;OSh77&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;63&lt;/TD&gt;
&lt;TD class="r data"&gt;66&lt;/TD&gt;
&lt;TD class="data"&gt;6121&lt;/TD&gt;
&lt;TD class="data"&gt;cacon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;12&lt;/TH&gt;
&lt;TD class="data"&gt;OSh77&lt;/TD&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;66&lt;/TD&gt;
&lt;TD class="r data"&gt;70&lt;/TD&gt;
&lt;TD class="data"&gt;6121&lt;/TD&gt;
&lt;TD class="data"&gt;cacon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;13&lt;/TH&gt;
&lt;TD class="data"&gt;OSh77&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;70&lt;/TD&gt;
&lt;TD class="r data"&gt;71&lt;/TD&gt;
&lt;TD class="data"&gt;6121&lt;/TD&gt;
&lt;TD class="data"&gt;cacon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;14&lt;/TH&gt;
&lt;TD class="data"&gt;OSi84&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;67&lt;/TD&gt;
&lt;TD class="r data"&gt;75&lt;/TD&gt;
&lt;TD class="data"&gt;6191&lt;/TD&gt;
&lt;TD class="data"&gt;cacase&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;15&lt;/TH&gt;
&lt;TD class="data"&gt;OSi84&lt;/TD&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;75&lt;/TD&gt;
&lt;TD class="r data"&gt;81&lt;/TD&gt;
&lt;TD class="data"&gt;6191&lt;/TD&gt;
&lt;TD class="data"&gt;cacase&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;16&lt;/TH&gt;
&lt;TD class="data"&gt;OSj17&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;60&lt;/TD&gt;
&lt;TD class="r data"&gt;75&lt;/TD&gt;
&lt;TD class="data"&gt;6191&lt;/TD&gt;
&lt;TD class="data"&gt;cacase&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;17&lt;/TH&gt;
&lt;TD class="data"&gt;OSj17&lt;/TD&gt;
&lt;TD class="r data"&gt;4&lt;/TD&gt;
&lt;TD class="r data"&gt;65&lt;/TD&gt;
&lt;TD class="r data"&gt;70&lt;/TD&gt;
&lt;TD class="data"&gt;6191&lt;/TD&gt;
&lt;TD class="data"&gt;cacase&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/ARTICLE&gt;
&lt;/SECTION&gt;
&lt;SECTION data-name="Print" data-sec-type="proc"&gt;&lt;HR /&gt;
&lt;DIV id="IDX1" class="systitleandfootercontainer"&gt;
&lt;P&gt;&lt;SPAN class="c systemtitle"&gt;Table 1: janitor records&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;ARTICLE aria-label="Data Set WORK.JANITOR_FINAL"&gt;
&lt;TABLE class="table" aria-label="Data Set WORK.JANITOR_FINAL"&gt;&lt;CAPTION aria-label="Data Set WORK.JANITOR_FINAL"&gt;&amp;nbsp;&lt;/CAPTION&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col"&gt;Obs&lt;/TH&gt;
&lt;TH class="header" scope="col"&gt;id&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;janitor_dur&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;janitor_ever&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;
&lt;TD class="data"&gt;OSa13&lt;/TD&gt;
&lt;TD class="r data"&gt;5.0&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;2&lt;/TH&gt;
&lt;TD class="data"&gt;OSa30&lt;/TD&gt;
&lt;TD class="r data"&gt;8.0&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;3&lt;/TH&gt;
&lt;TD class="data"&gt;OSf26&lt;/TD&gt;
&lt;TD class="r data"&gt;0.5&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;4&lt;/TH&gt;
&lt;TD class="data"&gt;OSi84&lt;/TD&gt;
&lt;TD class="r data"&gt;14.0&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;5&lt;/TH&gt;
&lt;TD class="data"&gt;OSj17&lt;/TD&gt;
&lt;TD class="r data"&gt;15.0&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/ARTICLE&gt;
&lt;/SECTION&gt;
&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;DIV id="IDX2" class="systitleandfootercontainer"&gt;
&lt;P&gt;&lt;SPAN class="c systemtitle"&gt;Table 2: baker records&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;ARTICLE aria-label="Data Set WORK.BAKER_FINAL"&gt;
&lt;TABLE class="table" width="152px" aria-label="Data Set WORK.BAKER_FINAL"&gt;&lt;CAPTION aria-label="Data Set WORK.BAKER_FINAL"&gt;&amp;nbsp;&lt;/CAPTION&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row" width="24px"&gt;1&lt;/TH&gt;
&lt;TD width="61px" class="data"&gt;OSa30&lt;/TD&gt;
&lt;TD width="66px" class="r data"&gt;7&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row" width="24px"&gt;2&lt;/TH&gt;
&lt;TD width="61px" class="data"&gt;OSa73&lt;/TD&gt;
&lt;TD width="66px" class="r data"&gt;8&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/ARTICLE&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Expected output:&lt;/P&gt;
&lt;P&gt;id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; janitor_dur&amp;nbsp; &amp;nbsp; janitor_ever&amp;nbsp; &amp;nbsp;baker_dur&amp;nbsp; &amp;nbsp; &amp;nbsp; baker_ever&lt;BR /&gt;osa13&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&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;0&lt;BR /&gt;osa30&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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;7&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;1&lt;BR /&gt;osa73&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&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;1&lt;BR /&gt;osf26&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; 0&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;0&lt;BR /&gt;osi84&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;14&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; 0&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;0&lt;BR /&gt;osj17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;15&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &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; 0&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;0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tables 1 and 2 are ok, but the problem is merging them to obtain the expected output above.&lt;/P&gt;
&lt;P&gt;I would finally merge janitor and baker files with table 0: original file.&lt;/P&gt;
&lt;P&gt;Please help. Thanks.&lt;/P&gt;
&lt;P&gt;ak.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 04:38:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Merging-two-separate-macro-results/m-p/723744#M9842</guid>
      <dc:creator>ak2011</dc:creator>
      <dc:date>2021-03-05T04:38:31Z</dc:date>
    </item>
    <item>
      <title>Merging two  macro results</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Merging-two-macro-results/m-p/723722#M9836</link>
      <description>&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;Hello,&lt;BR /&gt;I have two separate macro results (macro for janitor and macro for baker) and &lt;BR /&gt;my aim is to merge the two datasets together, but they are not working.&lt;BR /&gt;&lt;BR /&gt;Data set for janitor macro is jan and that for baker is bake.&lt;BR /&gt;&lt;BR /&gt;Table 1 is janitor results and Table 2 is baker results (shown below).&lt;BR /&gt;&lt;BR /&gt;proc print data=jan; doesn't work; same with proc print data=bake;&lt;BR /&gt;So to print janitor records, I just do proc print; and it works; same with baker.&lt;BR /&gt;&lt;BR /&gt;Help is needed, please to merge dataset jan and dataset bake, and  to be merged &lt;BR /&gt;finally with the original data Table o.&lt;BR /&gt;&lt;BR /&gt;[I did not run the merge procedures as they would print the 17 records (small_t_data)&lt;BR /&gt;&lt;BR /&gt;My data, code and results are found below:&lt;BR /&gt;Thanks in advance. [ No errors in log-too long so not shown]&lt;BR /&gt;ak.&lt;BR /&gt;&lt;BR /&gt;[As usual, I have read the SAS community answers &amp;amp; SAS documentation on macros but still no solution&lt;BR /&gt;found]. I would appreciate your help, please.&lt;BR /&gt;&lt;BR /&gt;/**MACRO*/&lt;BR /&gt;&lt;BR /&gt;data full_tdata;&lt;BR /&gt;input id$ 1-6 job 7-8 jobyrin 9-11 jobyrout 18-20  icode$ 23-27  lung$ 29-35;&lt;BR /&gt;datalines;&lt;BR /&gt;OSa13	3	73	      78	  6191	 cacase&lt;BR /&gt;OSa30	1	39	      46	  7181	 cacase&lt;BR /&gt;OSa30	3	56	      64	  6191	 cacase&lt;BR /&gt;OSa73	1	23	      31	  7181	 popcon&lt;BR /&gt;OSa73	2	31	      42	  5130	 popcon&lt;BR /&gt;OSa86	3	46	      60	  6198	 cacon&lt;BR /&gt;OSa86	4	60	      70	  5130	 cacon&lt;BR /&gt;OSa93	3	68	      72	  6121	 popcon&lt;BR /&gt;OSf26	1	54	      54	  6198	 popcon&lt;BR /&gt;OSf26	2	70	      70	  6191	 popcon&lt;BR /&gt;OSh77	1	63	      66	  6121	 cacon&lt;BR /&gt;OSh77	2	66	      70	  6121	 cacon&lt;BR /&gt;OSh77	3	70	      71	  6121	 cacon&lt;BR /&gt;OSi84	1	67	      75	  6191	 cacase&lt;BR /&gt;OSi84	2	75	      81	  6191	 cacase&lt;BR /&gt;OSj17	3	60	      75	  6191	 cacase&lt;BR /&gt;OSj17	4	65	      70	  6191	 cacase&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;proc print data=full_tdata;&lt;BR /&gt;title 'Table O: Original full_tdata file'; run;&lt;BR /&gt;&lt;BR /&gt;data small_tdata; set full_tdata; drop lung;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*max 4 jobs per subject;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;%macro duration(database=small_tdata, icode=6191, Job_title=janitor);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*Creating a dataset containing all the jobs with selected icode;&lt;BR /&gt;&lt;BR /&gt;data &amp;amp;Job_title;&lt;BR /&gt;set &amp;amp;database;&lt;BR /&gt;if icode = &amp;amp;icode;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*transposing dataset so that the YEARIN and YEAROUT of all jobs held by a subject are in the same row;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*YEARIN;&lt;BR /&gt;&lt;BR /&gt;proc transpose data = &amp;amp;Job_title out = &amp;amp;Job_title._yearin prefix = YEARIN;&lt;BR /&gt;by ID;&lt;BR /&gt;var jobyrin;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sort data = &amp;amp;Job_title._yearin;&lt;BR /&gt;by id;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;*YEAROUT;&lt;BR /&gt;&lt;BR /&gt;proc transpose data = &amp;amp;Job_title out = &amp;amp;Job_title._yearout prefix = YEAROUT;&lt;BR /&gt;by ID;&lt;BR /&gt;var jobyrout;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sort data = &amp;amp;Job_title._yearout;&lt;BR /&gt;by id;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data &amp;amp;Job_title._final;&lt;BR /&gt;merge &amp;amp;Job_title._yearin &amp;amp;Job_title._yearout;&lt;BR /&gt;by ID;&lt;BR /&gt;&lt;BR /&gt;array YEARIN (3) YEARIN1 YEARIN2 YEARIN3;&lt;BR /&gt;array YEAROUT (3) YEAROUT1 YEAROUT2 YEAROUT3;&lt;BR /&gt;&lt;BR /&gt;array YEARINv2 (3) YEARIN2 YEARIN3 YEARIN4 ;&lt;BR /&gt;array YEAROUTv2 (3) YEAROUT2 YEAROUT3 YEAROUT4;&lt;BR /&gt;&lt;BR /&gt;array YEARIN_F (4) YEARIN1 YEARIN2 YEARIN3 YEARIN4;&lt;BR /&gt;array YEAROUT_F (4) YEAROUT1 YEAROUT2 YEAROUT3 YEAROUT4;&lt;BR /&gt;&lt;BR /&gt;Array duration (4) Dur1 Dur2 Dur3 Dur4;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;do i = 1 to 3;&lt;BR /&gt;&lt;BR /&gt;if yearin(i) ne . and  yearinv2(i) ne . and yearinv2(i) le yearout(i) and yearoutv2(i) ge yearout(i) then do; yearinv2(i) = yearin(i); yearin(i) = .;yearout(i) = .;end;&lt;BR /&gt;else if  yearin(i) ne . and  yearinv2(i) ne . and yearinv2(i) le yearout(i) and yearoutv2(i) lt yearout(i) then do; yearinv2(i) = yearin(i);yearoutv2(i) = yearout(i); yearin(i) = .;yearout(i) = .;end;&lt;BR /&gt;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;do i = 1 to 4;&lt;BR /&gt;&lt;BR /&gt;if YEARIN_F(i) = . then  YEARIN_F(i) = 0;&lt;BR /&gt;if YEAROUT_F(i) = . then  YEAROUT_F(i) = 0;&lt;BR /&gt;&lt;BR /&gt;duration(i) = YEAROUT_F(i) - YEARIN_F(i);&lt;BR /&gt;if YEARIN_F(i) ne 0 and YEAROUT_F(i) = YEARIN_F(i) then duration(i) = 0.5;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;&amp;amp;Job_title._dur = Dur1 + Dur2 + Dur3 + Dur4;&lt;BR /&gt;&lt;BR /&gt;&amp;amp;Job_title._ever = 1;&lt;BR /&gt;&lt;BR /&gt;keep ID &amp;amp;Job_title._dur &amp;amp;Job_title._ever;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;%MEND duration;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/* 1st macro-janitor icode 6191*/&lt;BR /&gt;&lt;BR /&gt;data jan; set small_tdata;&lt;BR /&gt; &lt;BR /&gt;%duration(database=small_tdata, icode=6191, Job_title=janitor);&lt;BR /&gt;&lt;BR /&gt;proc print; &lt;BR /&gt;title 'Table 1: janitor records';&lt;BR /&gt;run;&lt;BR /&gt;proc sort data=jan; by id;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/* 2nd macro-baker icode 7181*/&lt;BR /&gt;&lt;BR /&gt;data bake; set small_tdata;&lt;BR /&gt; &lt;BR /&gt;%duration(database=small_tdata,icode=7181, Job_title=baker);&lt;BR /&gt;&lt;BR /&gt;proc print; &lt;BR /&gt;title 'Table 2: baker records';&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;SECTION data-name="Print" data-sec-type="proc"&gt;
&lt;DIV id="IDX" class="systitleandfootercontainer"&gt;
&lt;P&gt;&lt;SPAN class="c systemtitle"&gt;Table O: Original full_tdata file&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;ARTICLE aria-label="Data Set WORK.FULL_TDATA"&gt;
&lt;TABLE class="table" aria-label="Data Set WORK.FULL_TDATA"&gt;&lt;CAPTION aria-label="Data Set WORK.FULL_TDATA"&gt;&amp;nbsp;&lt;/CAPTION&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col"&gt;Obs&lt;/TH&gt;
&lt;TH class="header" scope="col"&gt;id&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;job&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;jobyrin&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;jobyrout&lt;/TH&gt;
&lt;TH class="header" scope="col"&gt;icode&lt;/TH&gt;
&lt;TH class="header" scope="col"&gt;lung&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;
&lt;TD class="data"&gt;OSa13&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;73&lt;/TD&gt;
&lt;TD class="r data"&gt;78&lt;/TD&gt;
&lt;TD class="data"&gt;6191&lt;/TD&gt;
&lt;TD class="data"&gt;cacase&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;2&lt;/TH&gt;
&lt;TD class="data"&gt;OSa30&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;39&lt;/TD&gt;
&lt;TD class="r data"&gt;46&lt;/TD&gt;
&lt;TD class="data"&gt;7181&lt;/TD&gt;
&lt;TD class="data"&gt;cacase&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;3&lt;/TH&gt;
&lt;TD class="data"&gt;OSa30&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;56&lt;/TD&gt;
&lt;TD class="r data"&gt;64&lt;/TD&gt;
&lt;TD class="data"&gt;6191&lt;/TD&gt;
&lt;TD class="data"&gt;cacase&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;4&lt;/TH&gt;
&lt;TD class="data"&gt;OSa73&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;23&lt;/TD&gt;
&lt;TD class="r data"&gt;31&lt;/TD&gt;
&lt;TD class="data"&gt;7181&lt;/TD&gt;
&lt;TD class="data"&gt;popcon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;5&lt;/TH&gt;
&lt;TD class="data"&gt;OSa73&lt;/TD&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;31&lt;/TD&gt;
&lt;TD class="r data"&gt;42&lt;/TD&gt;
&lt;TD class="data"&gt;5130&lt;/TD&gt;
&lt;TD class="data"&gt;popcon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;6&lt;/TH&gt;
&lt;TD class="data"&gt;OSa86&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;46&lt;/TD&gt;
&lt;TD class="r data"&gt;60&lt;/TD&gt;
&lt;TD class="data"&gt;6198&lt;/TD&gt;
&lt;TD class="data"&gt;cacon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;7&lt;/TH&gt;
&lt;TD class="data"&gt;OSa86&lt;/TD&gt;
&lt;TD class="r data"&gt;4&lt;/TD&gt;
&lt;TD class="r data"&gt;60&lt;/TD&gt;
&lt;TD class="r data"&gt;70&lt;/TD&gt;
&lt;TD class="data"&gt;5130&lt;/TD&gt;
&lt;TD class="data"&gt;cacon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;8&lt;/TH&gt;
&lt;TD class="data"&gt;OSa93&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;68&lt;/TD&gt;
&lt;TD class="r data"&gt;72&lt;/TD&gt;
&lt;TD class="data"&gt;6121&lt;/TD&gt;
&lt;TD class="data"&gt;popcon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;9&lt;/TH&gt;
&lt;TD class="data"&gt;OSf26&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;54&lt;/TD&gt;
&lt;TD class="r data"&gt;54&lt;/TD&gt;
&lt;TD class="data"&gt;6198&lt;/TD&gt;
&lt;TD class="data"&gt;popcon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;10&lt;/TH&gt;
&lt;TD class="data"&gt;OSf26&lt;/TD&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;70&lt;/TD&gt;
&lt;TD class="r data"&gt;70&lt;/TD&gt;
&lt;TD class="data"&gt;6191&lt;/TD&gt;
&lt;TD class="data"&gt;popcon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;11&lt;/TH&gt;
&lt;TD class="data"&gt;OSh77&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;63&lt;/TD&gt;
&lt;TD class="r data"&gt;66&lt;/TD&gt;
&lt;TD class="data"&gt;6121&lt;/TD&gt;
&lt;TD class="data"&gt;cacon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;12&lt;/TH&gt;
&lt;TD class="data"&gt;OSh77&lt;/TD&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;66&lt;/TD&gt;
&lt;TD class="r data"&gt;70&lt;/TD&gt;
&lt;TD class="data"&gt;6121&lt;/TD&gt;
&lt;TD class="data"&gt;cacon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;13&lt;/TH&gt;
&lt;TD class="data"&gt;OSh77&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;70&lt;/TD&gt;
&lt;TD class="r data"&gt;71&lt;/TD&gt;
&lt;TD class="data"&gt;6121&lt;/TD&gt;
&lt;TD class="data"&gt;cacon&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;14&lt;/TH&gt;
&lt;TD class="data"&gt;OSi84&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;67&lt;/TD&gt;
&lt;TD class="r data"&gt;75&lt;/TD&gt;
&lt;TD class="data"&gt;6191&lt;/TD&gt;
&lt;TD class="data"&gt;cacase&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;15&lt;/TH&gt;
&lt;TD class="data"&gt;OSi84&lt;/TD&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;75&lt;/TD&gt;
&lt;TD class="r data"&gt;81&lt;/TD&gt;
&lt;TD class="data"&gt;6191&lt;/TD&gt;
&lt;TD class="data"&gt;cacase&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;16&lt;/TH&gt;
&lt;TD class="data"&gt;OSj17&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;60&lt;/TD&gt;
&lt;TD class="r data"&gt;75&lt;/TD&gt;
&lt;TD class="data"&gt;6191&lt;/TD&gt;
&lt;TD class="data"&gt;cacase&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;17&lt;/TH&gt;
&lt;TD class="data"&gt;OSj17&lt;/TD&gt;
&lt;TD class="r data"&gt;4&lt;/TD&gt;
&lt;TD class="r data"&gt;65&lt;/TD&gt;
&lt;TD class="r data"&gt;70&lt;/TD&gt;
&lt;TD class="data"&gt;6191&lt;/TD&gt;
&lt;TD class="data"&gt;cacase&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/ARTICLE&gt;
&lt;/SECTION&gt;
&lt;SECTION data-name="Print" data-sec-type="proc"&gt;&lt;HR /&gt;
&lt;DIV id="IDX1" class="systitleandfootercontainer"&gt;
&lt;P&gt;&lt;SPAN class="c systemtitle"&gt;Table 1: janitor records&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;ARTICLE aria-label="Data Set WORK.JANITOR_FINAL"&gt;
&lt;TABLE class="table" aria-label="Data Set WORK.JANITOR_FINAL"&gt;&lt;CAPTION aria-label="Data Set WORK.JANITOR_FINAL"&gt;&amp;nbsp;&lt;/CAPTION&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col"&gt;Obs&lt;/TH&gt;
&lt;TH class="header" scope="col"&gt;id&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;janitor_dur&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;janitor_ever&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;1&lt;/TH&gt;
&lt;TD class="data"&gt;OSa13&lt;/TD&gt;
&lt;TD class="r data"&gt;5.0&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;2&lt;/TH&gt;
&lt;TD class="data"&gt;OSa30&lt;/TD&gt;
&lt;TD class="r data"&gt;8.0&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;3&lt;/TH&gt;
&lt;TD class="data"&gt;OSf26&lt;/TD&gt;
&lt;TD class="r data"&gt;0.5&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;4&lt;/TH&gt;
&lt;TD class="data"&gt;OSi84&lt;/TD&gt;
&lt;TD class="r data"&gt;14.0&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row"&gt;5&lt;/TH&gt;
&lt;TD class="data"&gt;OSj17&lt;/TD&gt;
&lt;TD class="r data"&gt;15.0&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/ARTICLE&gt;
&lt;/SECTION&gt;
&lt;SECTION data-name="Print" data-sec-type="proc"&gt;&lt;HR /&gt;
&lt;DIV id="IDX2" class="systitleandfootercontainer"&gt;
&lt;P&gt;&lt;SPAN class="c systemtitle"&gt;Table 2: baker records&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;ARTICLE aria-label="Data Set WORK.BAKER_FINAL"&gt;
&lt;TABLE class="table" width="264px" aria-label="Data Set WORK.BAKER_FINAL"&gt;&lt;CAPTION aria-label="Data Set WORK.BAKER_FINAL"&gt;&amp;nbsp;&lt;/CAPTION&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col" width="24px"&gt;Obs&lt;/TH&gt;
&lt;TH class="header" scope="col" width="61px"&gt;id&lt;/TH&gt;
&lt;TH class="r header" scope="col" width="66px"&gt;baker_dur&lt;/TH&gt;
&lt;TH width="40px"&gt;&amp;nbsp;&lt;/TH&gt;
&lt;TH class="r header" scope="col" width="72px"&gt;baker_ever&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row" width="24px"&gt;1&lt;/TH&gt;
&lt;TD width="61px" class="data"&gt;OSa30&lt;/TD&gt;
&lt;TD width="66px" class="r data"&gt;7&lt;/TD&gt;
&lt;TD width="40px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="72px" class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r rowheader" scope="row" width="24px"&gt;2&lt;/TH&gt;
&lt;TD width="61px" class="data"&gt;OSa73&lt;/TD&gt;
&lt;TD width="66px" class="r data"&gt;8&lt;/TD&gt;
&lt;TD width="40px"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="72px" class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/ARTICLE&gt;
&lt;/SECTION&gt;
&lt;PRE&gt;&lt;BR /&gt;Tables 1 and 2 results are what I am expecting but the problem is how to merge them.&lt;BR /&gt;Thanks in advance for your help.&lt;BR /&gt;&lt;BR /&gt;ak.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 23:30:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Merging-two-macro-results/m-p/723722#M9836</guid>
      <dc:creator>ak2011</dc:creator>
      <dc:date>2021-03-04T23:30:33Z</dc:date>
    </item>
    <item>
      <title>getting error  ERROR 22-322: Syntax error, expecting one of the following: !!, *, **, +, -, .., /, &lt;</title>
      <link>https://communities.sas.com/t5/SAS-Studio/getting-error-ERROR-22-322-Syntax-error-expecting-one-of-the/m-p/723527#M9834</link>
      <description>&lt;P&gt;proc optmodel;&lt;BR /&gt;var XA1,XA2,XA3,XB1,XB2,XB3,XC1,XC2,XC3,XD1,XD2,XD3;&lt;BR /&gt;max Z = 500XA1 + 650XA2 + 400XA3 + 750XB1 + 800XB2 + 700XB3 + 300XC1 + 400XC2 + 500XC3 + 450XD1 + 600XD2 + 550XD3;&lt;BR /&gt;con&lt;BR /&gt;XA1+XB1+XC1+XD1=12,&lt;BR /&gt;XA2+XB2+XC2+XD2=17,&lt;BR /&gt;XA3+XB3+XC3+XD3=11,&lt;BR /&gt;XA1+XA2+XA3=10,&lt;BR /&gt;XB1+XB2+XB3=10,&lt;BR /&gt;XC1+XC2+XC3=10,&lt;BR /&gt;XA1&amp;gt;=0,XA2&amp;gt;=0,XA3&amp;gt;=0,XB1&amp;gt;=0,XB2&amp;gt;=0,XB3&amp;gt;=0,XC1&amp;gt;=0,XC2&amp;gt;=0,XC3&amp;gt;=0,XD1&amp;gt;=0,XD2&amp;gt;=0,XD3&amp;gt;=0;&lt;BR /&gt;solve;&lt;BR /&gt;print XA1 XA2 XA3 XB1 XB2 XB3 XC1 XC2 XC3 XD1 XD2 XD3;run;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 17:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/getting-error-ERROR-22-322-Syntax-error-expecting-one-of-the/m-p/723527#M9834</guid>
      <dc:creator>jinssbox</dc:creator>
      <dc:date>2021-03-04T17:28:34Z</dc:date>
    </item>
    <item>
      <title>Macro results not showing</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Macro-results-not-showing/m-p/723511#M9831</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I posted this same macro question in my previous post and 2 people made comments on that. I have corrected the work based on their comments but the problem persists; I am unable to see the results of the macro and the log gives no error message.&lt;/P&gt;
&lt;P&gt;Help needed, please.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My data, code and log are given below:&lt;/P&gt;
&lt;P&gt;Thans for in advance for your help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ak.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;BR /&gt;/***MACRO*/&lt;BR /&gt;&lt;BR /&gt;data full_tdata;&lt;BR /&gt;input id$ 1-6 job 7-8 jobyrin 9-11 jobyrout 18-20  icode$ 23-27  lung$ 29-35;&lt;BR /&gt;datalines;&lt;BR /&gt;OSa13	3	73	      78	  6191	 cacase&lt;BR /&gt;OSa30	1	39	      46	  7181	 cacase&lt;BR /&gt;OSa30	3	56	      64	  6191	 cacase&lt;BR /&gt;OSa73	1	23	      31	  7181	 popcon&lt;BR /&gt;OSa73	2	31	      42	  5130	 popcon&lt;BR /&gt;OSa86	3	46	      60	  6198	 cacon&lt;BR /&gt;OSa86	4	60	      70	  5130	 cacon&lt;BR /&gt;OSa93	3	68	      72	  6121	 popcon&lt;BR /&gt;OSf26	1	54	      54	  6198	 popcon&lt;BR /&gt;OSf26	2	70	      70	  6191	 popcon&lt;BR /&gt;OSh77	1	63	      66	  6121	 cacon&lt;BR /&gt;OSh77	2	66	      70	  6121	 cacon&lt;BR /&gt;OSh77	3	70	      71	  6121	 cacon&lt;BR /&gt;OSi84	1	67	      75	  6191	 cacase&lt;BR /&gt;OSi84	2	75	      81	  6191	 cacase&lt;BR /&gt;OSj17	3	60	      75	  6191	 cacase&lt;BR /&gt;OSj17	4	65	      70	  6191	 cacase&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;proc print data=full_tdata;&lt;BR /&gt;&lt;BR /&gt;data small_tdata; set full_tdata; drop lung;&lt;BR /&gt;&lt;BR /&gt;proc freq data=small_tdata;&lt;BR /&gt;tables job; run;  &lt;BR /&gt;&lt;BR /&gt;proc print data=small_tdata;&lt;BR /&gt;run;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; /* MACRO TEST*/&lt;BR /&gt;&lt;BR /&gt;*max 4 jobs per subject;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;%macro duration(database=small_tdata, icode=icode, Job_title="baker");&lt;BR /&gt;&lt;BR /&gt;*Creating a dataset containing all the jobs with selected icode;&lt;BR /&gt;&lt;BR /&gt;data &amp;amp;Job_title;&lt;BR /&gt;set &amp;amp;database;&lt;BR /&gt;if icode = "&amp;amp;6191";&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*transposing dataset so that the YEARIN and YEAROUT of all jobs held by a subject are in the same row;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*YEARIN;&lt;BR /&gt;&lt;BR /&gt;proc transpose data = &amp;amp;Job_title out = &amp;amp;Job_title._yearin prefix = YEARIN;&lt;BR /&gt;by ID;&lt;BR /&gt;var jobyrin;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sort data = &amp;amp;Job_title._yearin;&lt;BR /&gt;by id;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;*YEAROUT;&lt;BR /&gt;&lt;BR /&gt;proc transpose data = &amp;amp;Job_title out = &amp;amp;Job_title._yearout prefix = YEAROUT;&lt;BR /&gt;by ID;&lt;BR /&gt;var jobyrout;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sort data = &amp;amp;Job_title._yearout;&lt;BR /&gt;by id;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data &amp;amp;Job_title._final;&lt;BR /&gt;merge &amp;amp;Job_title._yearin &amp;amp;Job_title._yearout;&lt;BR /&gt;by ID;&lt;BR /&gt;&lt;BR /&gt;array YEARIN (3) YEARIN1 YEARIN2 YEARIN3;&lt;BR /&gt;array YEAROUT (3) YEAROUT1 YEAROUT2 YEAROUT3;&lt;BR /&gt;&lt;BR /&gt;array YEARINv2 (3) YEARIN2 YEARIN3 YEARIN4 ;&lt;BR /&gt;array YEAROUTv2 (3) YEAROUT2 YEAROUT3 YEAROUT4;&lt;BR /&gt;&lt;BR /&gt;array YEARIN_F (4) YEARIN1 YEARIN2 YEARIN3 YEARIN4;&lt;BR /&gt;array YEAROUT_F (4) YEAROUT1 YEAROUT2 YEAROUT3 YEAROUT4;&lt;BR /&gt;&lt;BR /&gt;Array duration (4) Dur1 Dur2 Dur3 Dur4;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;do i = 1 to 3;&lt;BR /&gt;&lt;BR /&gt;if yearin(i) ne . and  yearinv2(i) ne . and yearinv2(i) le yearout(i) and yearoutv2(i) ge yearout(i) then do; yearinv2(i) = yearin(i); yearin(i) = .;yearout(i) = .;end;&lt;BR /&gt;else if  yearin(i) ne . and  yearinv2(i) ne . and yearinv2(i) le yearout(i) and yearoutv2(i) lt yearout(i) then do; yearinv2(i) = yearin(i);yearoutv2(i) = yearout(i); yearin(i) = .;yearout(i) = .;end;&lt;BR /&gt;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;do i = 1 to 4;&lt;BR /&gt;&lt;BR /&gt;if YEARIN_F(i) = . then  YEARIN_F(i) = 0;&lt;BR /&gt;if YEAROUT_F(i) = . then  YEAROUT_F(i) = 0;&lt;BR /&gt;&lt;BR /&gt;duration(i) = YEAROUT_F(i) - YEARIN_F(i);&lt;BR /&gt;if YEARIN_F(i) ne 0 and YEAROUT_F(i) = YEARIN_F(i) then duration(i) = 0.5;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;&amp;amp;Job_title._dur = Dur1 + Dur2 + Dur3 + Dur4;&lt;BR /&gt;&lt;BR /&gt;&amp;amp;Job_title._ever = 1;&lt;BR /&gt;&lt;BR /&gt;keep ID &amp;amp;Job_title._dur &amp;amp;Job_title._ever;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;/* Display the macro results*//*????? I am stuck here, please*/&lt;BR /&gt;&lt;BR /&gt;%duration(database=small_tdata,icode=icode, Job_title=baker);&lt;BR /&gt;&lt;BR /&gt;proc print data=&amp;amp;Job_title_final;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;%MEND duration;&lt;BR /&gt; &lt;/PRE&gt;
&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;2 TITLE;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;3 FOOTNOTE;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;4 OPTIONS LOCALE=en_US DFLANG=LOCALE;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;5 DATA _NULL_;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;6 RUN;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;7 OPTIONS VALIDVARNAME=V7;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;8 OPTIONS VALIDMEMNAME=EXTEND;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;9 FILENAME _HTMLOUT TEMP;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;10 FILENAME _RTFOUT TEMP ENCODING='UTF-8';&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;11 FILENAME _PDFOUT TEMP;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;12 FILENAME _GSFNAME TEMP;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;13 FILENAME _DATAOUT TEMP;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;14 %LET SYSCC=0;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;15 %LET _CLIENTAPP='SAS Studio';&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;16 %LET _CLIENTAPPABREV=Studio;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;17 %LET _CLIENTAPPVERSION=3.8;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;18 %LET _CLIENTVERSION=3.8;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;19 %LET _CLIENTMODE=basic;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;20 %LET _SASSERVERNAME=%BQUOTE(localhost);&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;21 %LET _SASHOSTNAME=%BQUOTE(localhost);&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;22 %LET _SASPROGRAMFILEHOST=%BQUOTE(localhost);&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;23 %LET _CLIENTUSERID=%BQUOTE(sasdemo);&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;24 %LET _CLIENTUSERNAME=%BQUOTE(sasdemo);&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;25 %LET CLIENTMACHINE=%BQUOTE(10.0.2.2);&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;26 %LET _CLIENTMACHINE=%BQUOTE(10.0.2.2);&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;27 %let SASWORKLOCATION="%sysfunc(getoption(work))/";&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;28 FILENAME _CWD '.';&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;29 DATA _NULL_;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;30 CALL SYMPUT('_SASWORKINGDIR',PATHNAME('_CWD'));&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;31 RUN;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;32 FILENAME _CWD;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;33&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;34 %LET _SASPROGRAMFILE = %NRQUOTE(%NRSTR(/folders/myfolders/multisitedata/Occup_Macro_ZM19.sas));&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;35 %LET _BASEURL = %BQUOTE(http://localhost:10080/SASStudio/);&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;36 %LET _EXECENV=SASStudio;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;37 DATA _NULL_;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;38 CALL SYMPUT("GRAPHINIT","");&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;39 CALL SYMPUT("GRAPHTERM","");&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;40 RC=TSLVL('SASXGOPT','N');&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;41 _ERROR_=0;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;42 IF (RC^=' ') THEN DO;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;43 CALL SYMPUT("GRAPHINIT","GOPTIONS RESET=ALL GSFNAME=_GSFNAME;");&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;44 CALL SYMPUT("GRAPHTERM","GOPTIONS NOACCESSIBLE;");&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;45 END;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;46 RUN;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;47 DATA _NULL_;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;48 RC=SYSPROD("PRODNUM002");&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;49 IF (RC^=1) THEN DO;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;50 CALL SYMPUT("GRAPHINIT","");&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;51 CALL SYMPUT("GRAPHTERM","");&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;52 END;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;53 RUN;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;54 %LET _DATAOUT_MIME_TYPE=;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;55 %LET _DATAOUT_NAME=;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;56 %LET _DATAOUT_TABLE=;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;57 %LET _DATAOUT_URL=;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;58 %SYMDEL _DATAOUT_MIME_TYPE _DATAOUT_NAME _DATAOUT_URL _DATAOUT_TABLE;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;59 %LET _SASWS_ = %BQUOTE(/folders/myfolders);&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;60 %LET _SASWSTEMP_=%BQUOTE(/folders/myfolders/.sasstudio/.images/717c6288-07d7-4390-9c85-69b0718d63f4);&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;61 ODS LISTING CLOSE;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;62 ODS AUTONAVIGATE OFF;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;63 ODS GRAPHICS ON;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;64 ODS HTML5 (ID=WEB) DEVICE=PNG GPATH="&amp;amp;_SASWSTEMP_" ENCODING=utf8 FILE=_HTMLOUT (TITLE='Results: Occup_Macro_ZM19.sas')&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;64 ! STYLE=Htmlblue OPTIONS(BITMAP_MODE='INLINE' OUTLINE='ON' SVG_MODE='INLINE'&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;64 ! CSS_PREFIX='.ods_717c6288-07d7-4390-9c85-69b0718d63f4' BODY_ID='div_717c6288-07d7-4390-9c85-69b0718d63f4' );&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;65 ODS RTF (ID=WEB) STYLE=Rtf FILE=_RTFOUT sasdate;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;66 ODS PDF (ID=WEB) STYLE=Pearl FILE=_PDFOUT;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;67 &amp;amp;GRAPHINIT;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;68 OPTIONS FIRSTOBS=1;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;69 OPTIONS OBS=MAX;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;70 OPTIONS DTRESET DATE NUMBER NOTES;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;71 OPTIONS NOTES STIMER SOURCE NOSYNTAXCHECK;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;73&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;74 /***MACRO*/&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;75&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;76 data full_tdata;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;77 input id$ 1-6 job 7-8 jobyrin 9-11 jobyrout 18-20 icode$ 23-27 lung$ 29-35;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;78 datalines;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;79 OSa13373 78 6191 cacase&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;80 OSa30139 46 7181 cacase&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;81 OSa30356 64 6191 cacase&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;82 OSa73123 31 7181 popcon&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;83 OSa73231 42 5130 popcon&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;84 OSa86346 60 6198 cacon&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;85 OSa86460 70 5130 cacon&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;86 OSa93368 72 6121 popcon&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;87 OSf26154 54 6198 popcon&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;88 OSf26270 70 6191 popcon&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;89 OSh77163 66 6121 cacon&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;90 OSh77266 70 6121 cacon&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;91 OSh77370 71 6121 cacon&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;92 OSi84167 75 6191 cacase&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;93 OSi84275 81 6191 cacase&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;94 OSj17360 75 6191 cacase&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;95 OSj17465 70 6191 cacase&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;96 ;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;97&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;98 proc print data=full_tdata;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;99&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;100 data small_tdata; set full_tdata; drop lung;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;101&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;102 proc freq data=small_tdata;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;103 tables job; run;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;104&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;105 proc print data=small_tdata;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;106 run;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;107&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;108&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;109 /* MACRO TEST*/&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;110&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;111 *max 4 jobs per subject;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;112&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;113&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;114 %macro duration(database=small_tdata, icode=icode, Job_title="baker");&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;115&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;116 *Creating a dataset containing all the jobs with selected icode;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;117&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;118 data &amp;amp;Job_title;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;119 set &amp;amp;database;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;120 if icode = "&amp;amp;6191";&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;121 run;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;122&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;123&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;124 *transposing dataset so that the YEARIN and YEAROUT of all jobs held by a subject are in the same row;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;125&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;126&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;127 *YEARIN;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;128&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;129 proc transpose data = &amp;amp;Job_title out = &amp;amp;Job_title._yearin prefix = YEARIN;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;130 by ID;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;131 var jobyrin;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;132 run;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;133&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;134 proc sort data = &amp;amp;Job_title._yearin;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;135 by id;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;136 run;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;137&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;138 *YEAROUT;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;139&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;140 proc transpose data = &amp;amp;Job_title out = &amp;amp;Job_title._yearout prefix = YEAROUT;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;141 by ID;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;142 var jobyrout;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;143 run;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;144&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;145 proc sort data = &amp;amp;Job_title._yearout;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;146 by id;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;147 run;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;148&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;149&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;150&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;151 data &amp;amp;Job_title._final;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;152 merge &amp;amp;Job_title._yearin &amp;amp;Job_title._yearout;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;153 by ID;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;154&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;155 array YEARIN (3) YEARIN1 YEARIN2 YEARIN3;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;156 array YEAROUT (3) YEAROUT1 YEAROUT2 YEAROUT3;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;157&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;158 array YEARINv2 (3) YEARIN2 YEARIN3 YEARIN4 ;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;159 array YEAROUTv2 (3) YEAROUT2 YEAROUT3 YEAROUT4;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;160&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;161 array YEARIN_F (4) YEARIN1 YEARIN2 YEARIN3 YEARIN4;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;162 array YEAROUT_F (4) YEAROUT1 YEAROUT2 YEAROUT3 YEAROUT4;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;163&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;164 Array duration (4) Dur1 Dur2 Dur3 Dur4;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;165&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;166&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;167&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;168 do i = 1 to 3;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;169&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;170 if yearin(i) ne . and yearinv2(i) ne . and yearinv2(i) le yearout(i) and yearoutv2(i) ge yearout(i) then do; yearinv2(i)&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;170 ! = yearin(i); yearin(i) = .;yearout(i) = .;end;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;171 else if yearin(i) ne . and yearinv2(i) ne . and yearinv2(i) le yearout(i) and yearoutv2(i) lt yearout(i) then do;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;171 ! yearinv2(i) = yearin(i);yearoutv2(i) = yearout(i); yearin(i) = .;yearout(i) = .;end;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;172&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;173 end;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;174&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;175 do i = 1 to 4;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;176&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;177 if YEARIN_F(i) = . then YEARIN_F(i) = 0;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;178 if YEAROUT_F(i) = . then YEAROUT_F(i) = 0;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;179&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;180 duration(i) = YEAROUT_F(i) - YEARIN_F(i);&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;181 if YEARIN_F(i) ne 0 and YEAROUT_F(i) = YEARIN_F(i) then duration(i) = 0.5;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;182 end;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;183&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;184 &amp;amp;Job_title._dur = Dur1 + Dur2 + Dur3 + Dur4;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;185&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;186 &amp;amp;Job_title._ever = 1;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;187&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;188 keep ID &amp;amp;Job_title._dur &amp;amp;Job_title._ever;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;189 run;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;190&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;191 /* Display the macro results*//*????? I am stuck here, please*/&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;192&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;193 %duration(database=small_tdata,icode=icode, Job_title=baker);&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;194&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;195 proc print data=&amp;amp;Job_title_final;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;196 run;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;197&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;198 %MEND duration;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;199&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;200&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;201 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;202 ODS HTML CLOSE;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;203 &amp;amp;GRAPHTERM; ;*';*";*/;RUN;QUIT;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;204 QUIT;RUN;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;205 ODS HTML5 (ID=WEB) CLOSE;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;206&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;207 ODS RTF (ID=WEB) CLOSE;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;208 ODS PDF (ID=WEB) CLOSE;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;209 FILENAME _GSFNAME;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;210 DATA _NULL_;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;211 RUN;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;212 OPTIONS NOTES STIMER SOURCE SYNTAXCHECK;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;213&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;Please I am expecting the macro to print out the results of all the necessary variables:&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;id yearin yearout yearin_f yearout_f job_title_dur job_title_ever.......&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;Thank you.&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;ak.&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;PRE&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;&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 17:01:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Macro-results-not-showing/m-p/723511#M9831</guid>
      <dc:creator>ak2011</dc:creator>
      <dc:date>2021-03-04T17:01:14Z</dc:date>
    </item>
    <item>
      <title>Ignoring missing values in Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Ignoring-missing-values-in-Do-Loop/m-p/723337#M9829</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am having some issues with an array and do loop.&amp;nbsp;&lt;/P&gt;&lt;P&gt;CODE:&lt;/P&gt;&lt;P&gt;data lettergrade;&lt;BR /&gt;set detailrounded;&lt;BR /&gt;array english_array[*] _numeric_;&lt;BR /&gt;do i = 1 to dim(english_array);&lt;BR /&gt;if english&amp;gt;=90 then englishgrade="A";&lt;BR /&gt;if english&amp;gt;=75 and english&amp;lt;=89 then englishgrade="B";&lt;BR /&gt;if english&amp;gt;=60 and english&amp;lt;=74 then englishgrade="C";&lt;BR /&gt;if english&amp;lt;=60 then englishgrade="D";&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some of my values are missing and I did not want SAS to automatically assign a letter grade of "D". Is there anyway to exclude any missing data points so no letter grade shows up?&amp;nbsp;&lt;BR /&gt;Let me know if that makes sense or if clarification is needed!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 01:01:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Ignoring-missing-values-in-Do-Loop/m-p/723337#M9829</guid>
      <dc:creator>ellpap</dc:creator>
      <dc:date>2021-03-04T01:01:18Z</dc:date>
    </item>
    <item>
      <title>Displaying macro results</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Displaying-macro-results/m-p/723126#M9824</link>
      <description>&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I would appreciate if someone could check my macro code below to see how best I can display the results of the written macro. Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My main objectives:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;For each id, to check if 1&lt;SUP&gt;st&lt;/SUP&gt; job overlaps with 2&lt;SUP&gt;nd&lt;/SUP&gt; job: if not do nothing. If yes, assign 1&lt;SUP&gt;st&lt;/SUP&gt; job start year to 2&lt;SUP&gt;nd&lt;/SUP&gt; job; and&amp;nbsp; record 1&lt;SUP&gt;st&lt;/SUP&gt; job start and end years as missing, to avoid counting the same year as twice. Eg. for Osa73, jobyrout for job 1 is 31; same with jobyrin job 2.&lt;/LI&gt;
&lt;LI&gt;Repeat procedure with newly created 2&lt;SUP&gt;nd&lt;/SUP&gt; job and 3&lt;SUP&gt;rd&lt;/SUP&gt; job.&lt;/LI&gt;
&lt;LI&gt;Assign 0 to missing values &amp;nbsp;and calculate duration of each remaining job; Jobs with same start and end yrs are coded as 0.5 year&lt;/LI&gt;
&lt;LI&gt;Sum all durations to obtain final duration variable&lt;/LI&gt;
&lt;LI&gt;Create ever held job as plumber ie. if icdode 6191=plumber(1=yes).&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;My code and log are found below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried many code to display/view the macros results but none of them worked.[I checked SAS forum and documentation too, but no solution found].&lt;/P&gt;
&lt;P&gt;Help needed, please.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;Ak.&lt;/P&gt;
&lt;PRE&gt;&lt;BR /&gt;data small_data;&lt;BR /&gt;input id$ 1-6 job 7-8 jobyrin 9-11 jobyrout 18-20  icode$ 23-27  lung$ 29-35;&lt;BR /&gt;datalines;&lt;BR /&gt;OSa13	3	73	      78	  6191	 cacase&lt;BR /&gt;OSa30	1	39	      46	  7181	 cacase&lt;BR /&gt;OSa30	3	56	      64	  6191	 cacase&lt;BR /&gt;OSa73	1	23	      31	  7181	 popcon&lt;BR /&gt;OSa73	2	31	      42	  5130	 popcon&lt;BR /&gt;OSa86	3	46	      60	  6198	 cacon&lt;BR /&gt;OSa86	4	60	      70	  5130	 cacon&lt;BR /&gt;OSa93	3	68	      72	  6121	 popcon&lt;BR /&gt;OSf26	1	54	      54	  6198	 popcon&lt;BR /&gt;OSf26	2	70	      70	  6191	 popcon&lt;BR /&gt;OSh77	1	63	      66	  6121	 cacon&lt;BR /&gt;OSh77	2	66	      70	  6121	 cacon&lt;BR /&gt;OSh77	3	70	      71	  6121	 cacon&lt;BR /&gt;OSi84	1	67	      75	  6191	 cacase&lt;BR /&gt;OSi84	2	75	      81	  6191	 cacase&lt;BR /&gt;;&lt;BR /&gt;proc print data=small_data;&lt;BR /&gt;&lt;BR /&gt;data jobd; set small_data; drop lung;&lt;BR /&gt;&lt;BR /&gt;proc freq data=jobd;&lt;BR /&gt;tables job; run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc print data=jobd;&lt;BR /&gt;run;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; /* MACRO TEST*/&lt;BR /&gt;&lt;BR /&gt;*max 4 jobs per subject in multi dataset so macro will consider a maximum of 4 potential jobs;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;%macro duration(database=small_data,icode=6191, Job_title=plumber);&lt;BR /&gt;&lt;BR /&gt;*Creating a dataset containing all the jobs with the selected CCDO 4-digit code;&lt;BR /&gt;&lt;BR /&gt;data &amp;amp;Job_title;&lt;BR /&gt;set &amp;amp;database;&lt;BR /&gt;if icode = &amp;amp;6191;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*transposing dataset so that the YEARIN and YEAROUT of all jobs held by a subject are in the same row;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;*YEARIN;&lt;BR /&gt;&lt;BR /&gt;proc transpose data = &amp;amp;Job_title out = &amp;amp;Job_title._yearin prefix = YEARIN;&lt;BR /&gt;by ID;&lt;BR /&gt;var jobyrin;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sort data = &amp;amp;Job_title._yearin;&lt;BR /&gt;by id;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;*YEAROUT;&lt;BR /&gt;&lt;BR /&gt;proc transpose data = &amp;amp;Job_title out = &amp;amp;Job_title._yearout prefix = YEAROUT;&lt;BR /&gt;by ID;&lt;BR /&gt;var jobyrout;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sort data = &amp;amp;Job_title._yearout;&lt;BR /&gt;by id;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data &amp;amp;Job_title._final;&lt;BR /&gt;merge &amp;amp;Job_title._yearin &amp;amp;Job_title._yearout;&lt;BR /&gt;by ID;&lt;BR /&gt;&lt;BR /&gt;array YEARIN (4) YEARIN1 YEARIN2 YEARIN3 YEARIN4;&lt;BR /&gt;array YEAROUT (4) YEAROUT1 YEAROUT2 YEAROUT3 YEAROUT4;&lt;BR /&gt;array YEARINv2 (4) YEARIN2 YEARIN3 YEARIN4 ;&lt;BR /&gt;array YEAROUTv2 (4) YEAROUT2 YEAROUT3 YEAROUT4;&lt;BR /&gt;&lt;BR /&gt;array YEARIN_F (5) YEARIN1 YEARIN2 YEARIN3 YEARIN4 YEARIN5;&lt;BR /&gt;array YEAROUT_F (5) YEAROUT1 YEAROUT2 YEAROUT3 YEAROUT4 YEAROUT5;&lt;BR /&gt;Array duration (5) Dur1 Dur2 Dur3 Dur4 Dur5;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;do i = 1 to 4;&lt;BR /&gt;&lt;BR /&gt;if yearin(i) ne . and  yearinv2(i) ne . and yearinv2(i) le yearout(i) and yearoutv2(i) ge yearout(i) then do; yearinv2(i) = yearin(i); yearin(i) = .;yearout(i) = .;end;&lt;BR /&gt;else if  yearin(i) ne . and  yearinv2(i) ne . and yearinv2(i) le yearout(i) and yearoutv2(i) lt yearout(i) then do; yearinv2(i) = yearin(i);yearoutv2(i) = yearout(i); yearin(i) = .;yearout(i) = .;end;&lt;BR /&gt;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;do i = 1 to 5;&lt;BR /&gt;&lt;BR /&gt;if YEARIN_F(i) = . then  YEARIN_F(i) = 0;&lt;BR /&gt;if YEAROUT_F(i) = . then  YEAROUT_F(i) = 0;&lt;BR /&gt;&lt;BR /&gt;duration(i) = YEAROUT_F(i) - YEARIN_F(i);&lt;BR /&gt;if YEARIN_F(i) ne 0 and YEAROUT_F(i) = YEARIN_F(i) then duration(i) = 0.5;&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;&amp;amp;Job_title._dur = Dur1 + Dur2 + Dur3 + Dur4 + Dur5;&lt;BR /&gt;&lt;BR /&gt;&amp;amp;Job_title._ever = 1;&lt;BR /&gt;&lt;BR /&gt;keep ID &amp;amp;Job_title._dur &amp;amp;Job_title._ever;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;%MEND duration;&lt;BR /&gt;&lt;BR /&gt;/* Display the macro results*//*????? I am stuck here*/&lt;BR /&gt;&lt;BR /&gt;proc print data=Job_title._final; run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;DIV&gt;
&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV class="sasSource"&gt;73 data small_data;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;74 input id$ 1-6 job 7-8 jobyrin 9-11 jobyrout 18-20 icode$ 23-27 lung$ 29-35;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;75 datalines;&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="sasLogNote1_1614772554779" class="sasNote"&gt;NOTE: The data set WORK.SMALL_DATA has 15 observations and 6 variables.&lt;/DIV&gt;
&lt;DIV id="sasLogNote2_1614772554779" class="sasNote"&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;real time 0.01 seconds&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;cpu time 0.02 seconds&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;91 ;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;92 proc print data=small_data;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;93&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="sasLogNote3_1614772554779" class="sasNote"&gt;NOTE: There were 15 observations read from the data set WORK.SMALL_DATA.&lt;/DIV&gt;
&lt;DIV id="sasLogNote4_1614772554779" class="sasNote"&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;real time 0.22 seconds&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;cpu time 0.23 seconds&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;94 data jobd; set small_data; drop lung;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;95&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="sasLogNote5_1614772554779" class="sasNote"&gt;NOTE: There were 15 observations read from the data set WORK.SMALL_DATA.&lt;/DIV&gt;
&lt;DIV id="sasLogNote6_1614772554779" class="sasNote"&gt;NOTE: The data set WORK.JOBD has 15 observations and 5 variables.&lt;/DIV&gt;
&lt;DIV id="sasLogNote7_1614772554779" class="sasNote"&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;real time 0.02 seconds&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;cpu time 0.02 seconds&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;96 proc freq data=jobd;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;97 tables job; run;&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="sasLogNote8_1614772554779" class="sasNote"&gt;NOTE: There were 15 observations read from the data set WORK.JOBD.&lt;/DIV&gt;
&lt;DIV id="sasLogNote9_1614772554779" class="sasNote"&gt;NOTE: PROCEDURE FREQ used (Total process time):&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;real time 0.12 seconds&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;cpu time 0.11 seconds&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;98&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;99&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;100 proc print data=jobd;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;101 run;&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="sasLogNote10_1614772554779" class="sasNote"&gt;NOTE: There were 15 observations read from the data set WORK.JOBD.&lt;/DIV&gt;
&lt;DIV id="sasLogNote11_1614772554779" class="sasNote"&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;real time 0.16 seconds&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;cpu time 0.16 seconds&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;102&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;103&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;104 /* MACRO TEST*/&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;105&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;106 *max 4 jobs per subject in multi dataset so macro will consider a maximum of 4 potential jobs;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;107&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;108&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;109 %macro duration(database=small_data,icode=6191, Job_title=plumber);&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;110&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;111 *Creating a dataset containing all the jobs with the selected CCDO 4-digit code;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;112&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;113 data &amp;amp;Job_title;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;114 set &amp;amp;database;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;115 if icode = &amp;amp;6191;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;116 run;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;117&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;118&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;119 *transposing dataset so that the YEARIN and YEAROUT of all jobs held by a subject are in the same row;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;120&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;121&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;122 *YEARIN;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;123&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;124 proc transpose data = &amp;amp;Job_title out = &amp;amp;Job_title._yearin prefix = YEARIN;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;125 by ID;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;126 var jobyrin;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;127 run;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;128&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;129 proc sort data = &amp;amp;Job_title._yearin;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;130 by id;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;131 run;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;132&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;133 *YEAROUT;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;134&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;135 proc transpose data = &amp;amp;Job_title out = &amp;amp;Job_title._yearout prefix = YEAROUT;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;136 by ID;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;137 var jobyrout;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;138 run;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;139&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;140 proc sort data = &amp;amp;Job_title._yearout;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;141 by id;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;142 run;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;143&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;144&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;145&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;146 data &amp;amp;Job_title._final;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;147 merge &amp;amp;Job_title._yearin &amp;amp;Job_title._yearout;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;148 by ID;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;149&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;150 array YEARIN (4) YEARIN1 YEARIN2 YEARIN3 YEARIN4;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;151 array YEAROUT (4) YEAROUT1 YEAROUT2 YEAROUT3 YEAROUT4;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;152 array YEARINv2 (4) YEARIN2 YEARIN3 YEARIN4 ;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;153 array YEAROUTv2 (4) YEAROUT2 YEAROUT3 YEAROUT4;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;154&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;155 array YEARIN_F (5) YEARIN1 YEARIN2 YEARIN3 YEARIN4 YEARIN5;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;156 array YEAROUT_F (5) YEAROUT1 YEAROUT2 YEAROUT3 YEAROUT4 YEAROUT5;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;157 Array duration (5) Dur1 Dur2 Dur3 Dur4 Dur5;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;158&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;159&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;160&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;161 do i = 1 to 4;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;162&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;163 if yearin(i) ne . and yearinv2(i) ne . and yearinv2(i) le yearout(i) and yearoutv2(i) ge yearout(i) then do; yearinv2(i)&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;163 ! = yearin(i); yearin(i) = .;yearout(i) = .;end;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;164 else if yearin(i) ne . and yearinv2(i) ne . and yearinv2(i) le yearout(i) and yearoutv2(i) lt yearout(i) then do;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;164 ! yearinv2(i) = yearin(i);yearoutv2(i) = yearout(i); yearin(i) = .;yearout(i) = .;end;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;165&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;166 end;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;167&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;168 do i = 1 to 5;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;169&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;170 if YEARIN_F(i) = . then YEARIN_F(i) = 0;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;171 if YEAROUT_F(i) = . then YEAROUT_F(i) = 0;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;172&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;173 duration(i) = YEAROUT_F(i) - YEARIN_F(i);&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;174 if YEARIN_F(i) ne 0 and YEAROUT_F(i) = YEARIN_F(i) then duration(i) = 0.5;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;175 end;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;176&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;177 &amp;amp;Job_title._dur = Dur1 + Dur2 + Dur3 + Dur4 + Dur5;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;178&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;179 &amp;amp;Job_title._ever = 1;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;180&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;181 keep ID &amp;amp;Job_title._dur &amp;amp;Job_title._ever;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;182 run;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;183&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;184 %MEND duration;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;185&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;186 /* Display the macro results*//*????? I am stuck here*/&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;187&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;188 proc print data=Job_title._final; run;&lt;/DIV&gt;
&lt;DIV id="sasLogError1_1614772554779" class="sasError"&gt;ERROR: Libref 'Job_title' exceeds 8 characters.&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="sasLogNote12_1614772554779" class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;
&lt;DIV id="sasLogNote13_1614772554779" class="sasNote"&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;real time 0.00 seconds&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;cpu time 0.00 seconds&lt;/DIV&gt;
&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;189&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;190&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;191&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;192 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;204&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;Thanks in advance for your help.&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;ak.&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;PRE id="pre_sasLog_179" class="sasLog"&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 12:01:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Displaying-macro-results/m-p/723126#M9824</guid>
      <dc:creator>ak2011</dc:creator>
      <dc:date>2021-03-03T12:01:40Z</dc:date>
    </item>
    <item>
      <title>Schedule batch job in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Schedule-batch-job-in-SAS-Studio/m-p/721357#M9813</link>
      <description>&lt;P&gt;I am trying to check if I can run automated batch job in SAS Studio. For example, I have couple of codes which I want to run in different time and want to schedule so that when the time comes the specific code starts running. I referred to the site:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-run-SAS-Studio-5-program-on-a-schedule/ta-p/588554" target="_blank"&gt;How to run SAS Studio 5 program on a schedule? - SAS Support Communities&lt;/A&gt;&amp;nbsp;but I saw user opened SAS Job Execution which I do not find in SAS Studio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can somebody help.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Siuli Basu&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 18:37:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Schedule-batch-job-in-SAS-Studio/m-p/721357#M9813</guid>
      <dc:creator>Siuli</dc:creator>
      <dc:date>2021-02-23T18:37:16Z</dc:date>
    </item>
    <item>
      <title>Accounting for zero inflated data as response in glimmix</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Accounting-for-zero-inflated-data-as-response-in-glimmix/m-p/721316#M9812</link>
      <description>&lt;P&gt;Hello, everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been using the proc glimmix approach for quite some time now to account for random effects while exploring my response of interest, but now I have a new variable, which is zero inflated, and I want to take it into account as a response. There are 76 samples with values different than zero and 238 with 0 as value (Bd_load). I also have the binomial option of the variable (Bd_presence), which replaces the values above 0 by 1, but does not change the ratio of 0/ non zero.&lt;/P&gt;&lt;P&gt;That's my model:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC GLIMMIX DATA=Bddata plots=all;
CLASS lake;
MODEL observed_spp = Bd_load julian_date altitude longitude human_impact / link=log s dist=negbin DDFM=SATTERTH; 
random lake;
RUN;&lt;/PRE&gt;&lt;P&gt;Where observed_spp is the number of species observed in each sample, julian_date/ altitude/ longitude/ human_impact are quantitative variables without any zero and Bd_load indicates my zero inflated vector. My question is: do I need to treat this variable in a special way so it can be correctly taken into account, or it can be considered like that, since it is an explanatory variable and not my response?&lt;BR /&gt;I tried to change the order and ran the following model&lt;/P&gt;&lt;PRE&gt;PROC GLIMMIX DATA=Bddata plots=all;
CLASS lake;
MODEL Bd_load = observed_spp julian_date altitude longitude human_impact / link=log s dist=negbin DDFM=SATTERTH; 
random lake;
RUN;&lt;/PRE&gt;&lt;P&gt;to see if the model was correctly structured for zero inflated data, but it did not converge using the variable as the response and negative binomial as distribution.&lt;BR /&gt;Does someone know what I could change to correctly consider my variable?&lt;BR /&gt;Many thanks in advance,&lt;/P&gt;&lt;P&gt;Adriana&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 16:08:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Accounting-for-zero-inflated-data-as-response-in-glimmix/m-p/721316#M9812</guid>
      <dc:creator>adrianacravo</dc:creator>
      <dc:date>2021-02-23T16:08:44Z</dc:date>
    </item>
    <item>
      <title>No output after running successfully</title>
      <link>https://communities.sas.com/t5/SAS-Studio/No-output-after-running-successfully/m-p/721171#M9786</link>
      <description>I use Sas EG and my proc sql have no errors. When I run it the first time, it generated output , then I made a few changes to the code like adding fields , in select and group by and when I run it, there is no error in log , and yet there is no output tab altogether! I am new to SAS and beginning to learn how it works. Please help.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 23 Feb 2021 02:50:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/No-output-after-running-successfully/m-p/721171#M9786</guid>
      <dc:creator>Addis</dc:creator>
      <dc:date>2021-02-23T02:50:39Z</dc:date>
    </item>
    <item>
      <title>SAS filetypes FDB, MDDB, DMDB</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SAS-filetypes-FDB-MDDB-DMDB/m-p/720583#M9774</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;I am new in a SAS community and using SAS Studio.&lt;BR /&gt;I am wondering if you could pls send some examples of code that helps me to generate such files in my Data folder&lt;BR /&gt;.sas7bfdb - FDB&lt;BR /&gt;.sas7bmdb - MDDB&lt;BR /&gt;.sas7bdmd - DMDB&lt;BR /&gt;Maybe do you have some samples based on SASHELP library to look at them?&lt;BR /&gt;Thanks a lot for any help&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 21:35:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SAS-filetypes-FDB-MDDB-DMDB/m-p/720583#M9774</guid>
      <dc:creator>JohnSASNew</dc:creator>
      <dc:date>2021-02-19T21:35:16Z</dc:date>
    </item>
    <item>
      <title>invalid object specified</title>
      <link>https://communities.sas.com/t5/SAS-Studio/invalid-object-specified/m-p/720300#M9764</link>
      <description>&lt;P&gt;I am new to SAS so perhaps it is a simple error.&amp;nbsp; I am using code and data that someone else wrote and worked on their system. &amp;nbsp;Data is being read in, but I get the error "Invalid object specified to bridge protocol engine."&amp;nbsp; It seems I may need to do a "hot fix"&amp;nbsp; but none of the fixes seemed to address this issue.&amp;nbsp; I am running Studio 3.81.&amp;nbsp; Thanks&lt;/P&gt;&lt;P&gt;Here is the code, and I have attached five of the sixteen input files (maximum allowed).&lt;/P&gt;&lt;P&gt;options ls=132; * nocenter; * nodate nonumber 80 ps=9999;&lt;BR /&gt;/*OITP Summary 110320_AN-INS1BLACK*/&lt;BR /&gt;%macro transit(CallN,Man,Ins,Col);&lt;BR /&gt;data d&amp;amp;CallN;&amp;nbsp; infile "c:\SAS_Data\OITP Summary 012621_&amp;amp;Man-&amp;amp;Ins&amp;amp;Col..csv" dlm=',' dsd truncover;&lt;BR /&gt;&amp;nbsp; MANUF="&amp;amp;Man";&amp;nbsp; length Layer1 Layer2 $ 5;&amp;nbsp; Layer1="&amp;amp;Ins";&amp;nbsp; Layer2="&amp;amp;Col";&amp;nbsp; if Layer2=' ' then Layer2='none';&lt;BR /&gt;* input (NO TYPE LAB COLOUR TEMP DRATE) ($) TIME_d (LAB_A MODEL CALIB RAMP TEMP_T FLOW_O FLOW_N) ($) WT1-WT5 OITP1-OITP5;&lt;BR /&gt;&amp;nbsp; input (NO TYPE LAB COLOUR TEMP DRATE) ($) TIME_d (LAB_A MODEL CALIB RAMP FLOW_O) ($) WT1-WT5 OITP1-OITP5;&amp;nbsp; chk=substr(NO,1,1);&lt;BR /&gt;&amp;nbsp; if 'A'&amp;lt;=chk&amp;lt;='R' then do;&amp;nbsp; chk2=substr(NO,6,1);&amp;nbsp; chk3=substr(NO,7,1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if '1'&amp;lt;=chk2&amp;lt;='5' then Chamber=chk2;&amp;nbsp; else if '1'&amp;lt;=chk3&amp;lt;='5' then Chamber=chk3;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp; else if '1'&amp;lt;=chk&amp;lt;='6' then Chamber=chk;&amp;nbsp; else delete;&amp;nbsp; if WT1=. then delete;&lt;BR /&gt;&amp;nbsp; keep MANUF Layer1 Layer2 TIME_d WT1-WT5 OITP1-OITP5 Chamber;&lt;BR /&gt;proc print uniform;&amp;nbsp; var MANUF Layer1 Layer2 Chamber TIME_d WT1-WT5 OITP1-OITP5;&amp;nbsp; title "&amp;amp;CallN Raw &amp;amp;Man-&amp;amp;Ins&amp;amp;Col Data";&lt;BR /&gt;data d&amp;amp;CallN;&amp;nbsp; set d&amp;amp;CallN;&lt;BR /&gt;&amp;nbsp; if TIME_d=0 then do Chamber='1','2','3','4','5';&amp;nbsp; output;&amp;nbsp; end;&amp;nbsp; else output;&lt;BR /&gt;data d&amp;amp;CallN;&amp;nbsp; set d&amp;amp;CallN;&amp;nbsp; keep MANUF Layer1 Layer2 TIME_d WT OITP Chamber rep;&lt;BR /&gt;&amp;nbsp; rep=1;&amp;nbsp; Wt=WT1;&amp;nbsp; OITP=OITP1;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; rep=2;&amp;nbsp; Wt=WT2;&amp;nbsp; OITP=OITP2;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; rep=3;&amp;nbsp; Wt=WT3;&amp;nbsp; OITP=OITP3;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; rep=4;&amp;nbsp; Wt=WT4;&amp;nbsp; OITP=OITP4;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; rep=5;&amp;nbsp; Wt=WT5;&amp;nbsp; OITP=OITP5;&amp;nbsp; output;&lt;BR /&gt;data d&amp;amp;CallN;&amp;nbsp; set d&amp;amp;CallN;&amp;nbsp; if wt&amp;gt;.;&lt;BR /&gt;proc print uniform;&amp;nbsp; var MANUF Layer1 Layer2 Chamber TIME_d rep WT OITP;&amp;nbsp; title "&amp;amp;CallN Transposed &amp;amp;Man-&amp;amp;Ins&amp;amp;Col Data";&lt;BR /&gt;%mend transit;&lt;/P&gt;&lt;P&gt;%transit(1,RB,J,);&lt;BR /&gt;%transit(2,RB,INS1,);&lt;BR /&gt;%transit(3,RB,INS2,);&lt;BR /&gt;%transit(4,RB,INS3,);&lt;BR /&gt;%transit(5,AN,J,);&lt;BR /&gt;%transit(6,AN,INS1,BLACK);&lt;BR /&gt;%transit(7,AN,INS1,PINK);&lt;BR /&gt;%transit(8,AN,INS2,BLACK);&lt;BR /&gt;%transit(9,AN,INS2,PINK);&lt;BR /&gt;%transit(10,BW,J,);&lt;BR /&gt;%transit(11,BW,INS1,);&lt;BR /&gt;%transit(12,BW,INS2,);&lt;BR /&gt;%transit(13,OK,INS1,);&lt;BR /&gt;%transit(14,OK,INS2,);&lt;BR /&gt;%transit(15,OK,INS3,);&lt;BR /&gt;%transit(16,OK,J,);&lt;BR /&gt;data all;&amp;nbsp; set d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16;&amp;nbsp; CHAM=0;&amp;nbsp; CHAM=Chamber;&lt;BR /&gt;&amp;nbsp; temp=(CHAM=1)*55 + (CHAM&amp;gt;1)*81;&lt;BR /&gt;&amp;nbsp; wet =(CHAM=2)&amp;nbsp;&amp;nbsp;&amp;nbsp; + (CHAM=4);&lt;BR /&gt;&amp;nbsp; GrHr =(CHAM&amp;gt;3)*20 + (CHAM&amp;lt;4)*69;&amp;nbsp; time_m=TIME_d/30;&amp;nbsp; Exp=time_m/2;&amp;nbsp; drop TIME_d Exp;&lt;BR /&gt;* time=Exp*2;&amp;nbsp; dose=round((GrHr=20)*Exp*23.2/8 + (GrHr=69)*Exp*80/8,.1);&lt;BR /&gt;proc corr;&amp;nbsp; title 'Basic Relationships for OITP and Read or Generated Variables';&lt;BR /&gt;proc univariate normal plot;&amp;nbsp; var OITP;&amp;nbsp; ID Wt;&lt;BR /&gt;proc glm;&amp;nbsp; class MANUF Layer1 Layer2 CHAM rep;&lt;BR /&gt;&amp;nbsp; model OITP = MANUF Layer1 Layer2 CHAM rep TEMP WET GRHR TIME_m DOSE wt;&amp;nbsp; title2 'Step 0. OITP Full Model';&lt;BR /&gt;proc glm;&amp;nbsp; class MANUF Layer1 Layer2 CHAM&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;BR /&gt;&amp;nbsp; model OITP = MANUF Layer1 Layer2 CHAM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TEMP WET GRHR TIME_m DOSE wt;&amp;nbsp; title2 'Step 1. OITP: Drop REP';&lt;BR /&gt;proc glm;&amp;nbsp; class MANUF Layer1 Layer2 CHAM&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;BR /&gt;&amp;nbsp; model OITP = MANUF Layer1 Layer2 CHAM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TEMP WET GRHR TIME_m DOSE&amp;nbsp;&amp;nbsp; ;&amp;nbsp; title2 'Step 2. OITP: Drop REP, WT';&lt;BR /&gt;proc glm;&amp;nbsp; class MANUF Layer1 Layer2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;BR /&gt;&amp;nbsp; model OITP = MANUF Layer1 Layer2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TEMP WET GRHR TIME_m DOSE&amp;nbsp;&amp;nbsp; ;&amp;nbsp; title2 'Step 3. OITP: Drop REP, WT, CHAM';&lt;BR /&gt;proc glm;&amp;nbsp; class MANUF Layer1 Layer2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;BR /&gt;&amp;nbsp; model OITP = MANUF Layer1 Layer2&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; WET GRHR TIME_m DOSE&amp;nbsp;&amp;nbsp; ;&amp;nbsp; title2 'Step 4. OITP: Drop REP, WT, CHAM, TEMP';&lt;BR /&gt;proc glm;&amp;nbsp; class MANUF Layer1 Layer2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;BR /&gt;&amp;nbsp; model OITP = MANUF Layer1 Layer2&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; WET&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TIME_m DOSE&amp;nbsp;&amp;nbsp; /noint solution;&amp;nbsp; title2 'Step 5. OITP: Drop REP, WT, CHAM, TEMP, GRHR';&lt;/P&gt;&lt;P&gt;endsas;*======================================================================================================;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 19:12:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/invalid-object-specified/m-p/720300#M9764</guid>
      <dc:creator>AronN</dc:creator>
      <dc:date>2021-02-18T19:12:27Z</dc:date>
    </item>
    <item>
      <title>Looking for SAS Studio tutor for hire for college student in Biostatistics course</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Looking-for-SAS-Studio-tutor-for-hire-for-college-student-in/m-p/719960#M9759</link>
      <description>&lt;P&gt;Online format, probably a few one-hour sessions. Student is a public health major - not a programmer.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 16:30:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Looking-for-SAS-Studio-tutor-for-hire-for-college-student-in/m-p/719960#M9759</guid>
      <dc:creator>b_clay</dc:creator>
      <dc:date>2021-02-17T16:30:19Z</dc:date>
    </item>
    <item>
      <title>Disable SAS Studio Splash Screen</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Disable-SAS-Studio-Splash-Screen/m-p/719451#M9754</link>
      <description>&lt;P&gt;Is there a way to prevent SAS Studio from displaying the splash screen at launch or at least a way to make it so that it isn't on top of all other windows?&lt;/P&gt;
&lt;P&gt;I tried adding -NOSPLASH to my SAS config file but that apparently refers to something else.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to restate the issue, whenever I launch SAS Studio the below window displays for several seconds and it covers up all other Windows (i.e. my browser, other applications, etc.) and can't be closed or moved. &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="sas_studio_splash.png" style="width: 457px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54770i91F1E0B092ADA892/image-size/large?v=v2&amp;amp;px=999" role="button" title="sas_studio_splash.png" alt="sas_studio_splash.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 19:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Disable-SAS-Studio-Splash-Screen/m-p/719451#M9754</guid>
      <dc:creator>tedway</dc:creator>
      <dc:date>2021-02-15T19:09:53Z</dc:date>
    </item>
    <item>
      <title>Creating tertiles based on a control group</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Creating-tertiles-based-on-a-control-group/m-p/719231#M9742</link>
      <description>&lt;P&gt;I want to create tertiles to organize my data into categories. However, I want the tertiles to be made based off of the control group. I tried this code, but then when I run the proc freq the table only shows data when casecont_path=1. How do I create tertiles using one group, then apply it to both the cases and the controls?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc rank data=work.adenovar groups=3;&lt;BR /&gt;where casecont_path=1;&lt;BR /&gt;var jointyears;&lt;BR /&gt;ranks jointyears_tert;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*categorical joint years*/&lt;BR /&gt;data work.adeno1;&lt;BR /&gt;set work.data1;&lt;BR /&gt;if hash=2 then jointyears_cat=0;&lt;BR /&gt;if jointyears_tert=0 then jointyears_cat=1;&lt;BR /&gt;if jointyears_tert=1 then jointyears_cat=2;&lt;BR /&gt;if jointyears_tert=2 then jointyears_cat=3;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data=work.adeno1;&lt;BR /&gt;tables jointyears_cat*casecont_path/norow nopercent;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2021 20:39:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Creating-tertiles-based-on-a-control-group/m-p/719231#M9742</guid>
      <dc:creator>gejoachim99</dc:creator>
      <dc:date>2021-02-14T20:39:23Z</dc:date>
    </item>
    <item>
      <title>How do I sort means by descending order after PROC MEANS</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-do-I-sort-means-by-descending-order-after-PROC-MEANS/m-p/719150#M9735</link>
      <description>&lt;P&gt;Hello, I have been trying to sort my means after computing them with the PROC MEANS function. I used the same code for the a slightly different problem. When I use the proc sort function, it tell me my variable does does exist. Any ideas?&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="Screenshot 2021-02-13 at 4.38.25 PM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54706iE535CF70B66C606C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-02-13 at 4.38.25 PM.png" alt="Screenshot 2021-02-13 at 4.38.25 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Feb 2021 21:40:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-do-I-sort-means-by-descending-order-after-PROC-MEANS/m-p/719150#M9735</guid>
      <dc:creator>mroungou</dc:creator>
      <dc:date>2021-02-13T21:40:56Z</dc:date>
    </item>
    <item>
      <title>Accept first value when merging datasets</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Accept-first-value-when-merging-datasets/m-p/719138#M9734</link>
      <description>&lt;P&gt;I am looking at subsets of data from a larger dataset to see which variables are contained in which event. The original data is structured similar to the following:&lt;/P&gt;&lt;P&gt;ID EVENT VAR1 VAR2 VAR3 VAR4 VAR5 ....&lt;/P&gt;&lt;P&gt;1&amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&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;.&lt;/P&gt;&lt;P&gt;1&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; 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/P&gt;&lt;P&gt;1&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; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7&lt;/P&gt;&lt;P&gt;2&amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&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; .&lt;/P&gt;&lt;P&gt;2&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;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;3&amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&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; .&lt;/P&gt;&lt;P&gt;3&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;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;3&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;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After I subset&amp;nbsp;by event using the WEHERE statement I plan to have something like:&lt;/P&gt;&lt;P&gt;Event 1&lt;/P&gt;&lt;P&gt;ID VAR1 VAR2 VAR3 VAR4 VAR5 ....&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp;1&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;.&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp;0&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; .&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp;1&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; .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Event 2&lt;/P&gt;&lt;P&gt;ID VAR1 VAR2 VAR3 VAR4 VAR5 ....&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/P&gt;&lt;P&gt;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;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;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;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Event 3&lt;/P&gt;&lt;P&gt;ID VAR1 VAR2 VAR3 VAR4 VAR5 ....&lt;/P&gt;&lt;P&gt;1&amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&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; 7&lt;/P&gt;&lt;P&gt;3&amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would then like to&amp;nbsp;&lt;STRONG&gt;(1)&lt;/STRONG&gt; delete any column within each subset that does not contain any information,&amp;nbsp;then&amp;nbsp;&lt;STRONG&gt;(2)&amp;nbsp;&lt;/STRONG&gt;merge the datasets to where I only have one row per ID, while&amp;nbsp;&lt;STRONG&gt;(3)&lt;/STRONG&gt; maintaining the information of the left most dataset if there is information for a variable in both datasets. So merging Event 3 to Event 2, I would want to keep the VAR3 observations from Event 2 and not Event 3. Is there a way to do this? (&lt;U&gt;Note:&lt;/U&gt; actual dataset has about 100 variables) I suppose would it be better to right join Event 2 to Event 3 or left join Event 3 to Event 2?&lt;/P&gt;</description>
      <pubDate>Sat, 13 Feb 2021 19:54:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Accept-first-value-when-merging-datasets/m-p/719138#M9734</guid>
      <dc:creator>amarikow57</dc:creator>
      <dc:date>2021-02-13T19:54:26Z</dc:date>
    </item>
    <item>
      <title>how to configure a directory shortcut to an external directory on windows pc</title>
      <link>https://communities.sas.com/t5/SAS-Studio/how-to-configure-a-directory-shortcut-to-an-external-directory/m-p/718096#M9724</link>
      <description>&lt;P&gt;I need to know how to determine the path for an external directory. SAS Studio does not allow me to do it?&lt;SPAN style="font-family: inherit;"&gt;&amp;nbsp;Please see two snapshots. Thanks.&amp;nbsp; Mary A. Marion&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 02:08:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/how-to-configure-a-directory-shortcut-to-an-external-directory/m-p/718096#M9724</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-02-10T02:08:00Z</dc:date>
    </item>
    <item>
      <title>PROC TABULATE not reading in all data</title>
      <link>https://communities.sas.com/t5/SAS-Studio/PROC-TABULATE-not-reading-in-all-data/m-p/718083#M9722</link>
      <description>&lt;P&gt;I am running into some issues getting PROC TABULATE to correctly count the frequency of my categorical variables. A snippet of the Log file and the output of both the PROC TABULATE (top table) and the PROC FREQ (bottom table of gender) are below. My code is as such:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title 'Table 1. Child Demographics';
*Does not like ATEAM_AUTISM_TYPE --&amp;gt; Assess outside of True/False positives;
PROC TABULATE data = CLEANED.Analytic_Data;
 options fmtsearch = (OUTPUT);
 keyword n / style = [just=R];
 keyword pctn / style = [just=L];
 class ATEAM_AUTISM_YES_NO CHILD_GENDER ATEAM_AUTISM_TYPE ASD_DTEAM_COMORBID_YESNO;  
 classlev CHILD_GENDER ATEAM_AUTISM_TYPE ASD_DTEAM_COMORBID_YESNO/ s = [just=R];
 table (CHILD_GENDER = 'Sex of Child' ATEAM_AUTISM_TYPE = 'Type of Autism' ASD_DTEAM_COMORBID_YESNO = 'Comorbidity Present'),
       (ALL = 'All Data ~nn (%)' ATEAM_AUTISM_YES_NO = 'A Team Autism Diagnosis')*(n ='' * [style = [just=R cellwidth = 75] f = 8.2]
	    											  	      pctn ='' * [style = [just=L cellwidth = 80] f = paren.]) / box = 'Child Variables';
 format ATEAM_AUTISM_YES_NO asd_perc. CHILD_GENDER sex. ATEAM_AUTISM_TYPE $asdtype. ASD_DTEAM_COMORBID_YESNO yesno.;
RUN; *Not stratifying properly;

PROC FREQ data = WORK.Data2019;
 table ATEAM_AUTISM_YES_NO*(CHILD_GENDER ATEAM_AUTISM_TYPE ASD_DTEAM_COMORBID_YESNO);
 options fmtsearch = (OUTPUT);
 format ATEAM_AUTISM_YES_NO asd. CHILD_GENDER sex. ATEAM_AUTISM_TYPE $asdtype. ASD_DTEAM_COMORBID_YESNO yesno.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;For whatever reason, false positive isn't showing up at all. Furthermore, the numbers calculated for overall and true positive don't even match the frequency table. I am unsure where SAS got these values nor why PROC TABULATE would produce different results from PROC FREQ.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used similar code formatting for continuous variables stratified for Autism diagnosis and got matching results to PROC MEANS. I am not sure why it works well with some and not others. Does anyone have any ideas what could be causing this issue? Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table1_Problems.png" style="width: 597px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54532iAC34EC950F722C17/image-size/large?v=v2&amp;amp;px=999" role="button" title="Table1_Problems.png" alt="Table1_Problems.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table1_Log.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54533iF8E5842FA2EF9B89/image-size/large?v=v2&amp;amp;px=999" role="button" title="Table1_Log.png" alt="Table1_Log.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 00:47:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/PROC-TABULATE-not-reading-in-all-data/m-p/718083#M9722</guid>
      <dc:creator>amarikow57</dc:creator>
      <dc:date>2021-02-10T00:47:40Z</dc:date>
    </item>
    <item>
      <title>Identify rows based on two conditions</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Identify-rows-based-on-two-conditions/m-p/717720#M9715</link>
      <description>&lt;P&gt;I have data of something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID EVENT SCORE&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6&lt;/P&gt;&lt;P&gt;4&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;4&amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I care about scores not matching for an ID. That is IDs 3 and 4 would be of interest. Is there a way to view only those IDs keeping in mind that my actual dataset has many more IDs than this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 20:05:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Identify-rows-based-on-two-conditions/m-p/717720#M9715</guid>
      <dc:creator>amarikow57</dc:creator>
      <dc:date>2021-02-08T20:05:55Z</dc:date>
    </item>
    <item>
      <title>Collapse ID while keeping the max value of the column</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Collapse-ID-while-keeping-the-max-value-of-the-column/m-p/717460#M9711</link>
      <description>&lt;P&gt;&lt;U&gt;Note:&lt;/U&gt; I am still learning a lot about SAS, so a somewhat detailed response would be incredibly helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a fairly large dataset (109 columns) that I would like to merge with another dataset to complete the information. However, this dataset has multiple rows per ID while the one I'd like to merge it to only has one row per ID. I would like to get the long dataset down to one row per ID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because of how the long dataset was compiled there is a lot of "missing" information. That is, each ID has a row for different surveys that assessed different questions. See simplified example below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; SURVEY&amp;nbsp; 1Q1 1Q2 1Q3 2Q1 2Q2 3Q1 3Q2 3Q3 3Q4 3Q5 4Q1 4Q2 4Q3 4Q4 5Q1 5Q2 5Q3&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&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; &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;/P&gt;&lt;P&gt;1&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; &amp;nbsp; &amp;nbsp;8&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&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;/P&gt;&lt;P&gt;1&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; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp;5&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; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;1&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; &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;1&amp;nbsp; &amp;nbsp; &amp;nbsp; 4&amp;nbsp; &amp;nbsp; &amp;nbsp;2&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;.&lt;/P&gt;&lt;P&gt;1&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; &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;1&amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; 3&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; &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;/P&gt;&lt;P&gt;2&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; &amp;nbsp; &amp;nbsp;7&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; &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;/P&gt;&lt;P&gt;2&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; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp;5&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;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;2&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; &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;0&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; 3&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; &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;/P&gt;&lt;P&gt;3&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; &amp;nbsp; &amp;nbsp;6&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&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;/P&gt;&lt;P&gt;3&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; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp;5&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; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;3&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; &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;1&amp;nbsp; &amp;nbsp; &amp;nbsp; 4&amp;nbsp; &amp;nbsp; &amp;nbsp;2&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;.&lt;/P&gt;&lt;P&gt;3&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; &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;0&amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;4&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&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; &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;/P&gt;&lt;P&gt;4&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; &amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&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;/P&gt;&lt;P&gt;4&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; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp;5&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; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;5&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; 3&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; &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;/P&gt;&lt;P&gt;5&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; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp;4&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; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&lt;/P&gt;&lt;P&gt;5&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; &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;1&amp;nbsp; &amp;nbsp; &amp;nbsp; 4&amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&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;5&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; &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;1&amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially I want to collapse the IDs without losing valuable information. So my questions are as followed:&lt;/P&gt;&lt;P&gt;(1) Is there a SAS function that will allow me to keep one observation per ID where the max value is kept? I can get down to one ID with the following function:&lt;/P&gt;&lt;PRE&gt;DATA OUTPUT.uniqueID;
 update OUTPUT.allID(obs = 1) OUTPUT.allID;
 by AUTISM_ID;
RUN; &lt;/PRE&gt;&lt;P&gt;However, it seems to only keep the first value, when I'd rather it keep the max.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(2) If not possible, is there a way to repeat the value for the entire ID in an efficient manner? I have tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC SQL;
 create table OUTPUT.allID as 
 	select *, &lt;BR /&gt;                max(AGE_DIAG_M) as AGE_DIAG_MONTHS,
 		max(AGE_DIAG_Y) as AGE_DIAG_YEARS,
 		max(CHILD_GENDER) as SEX,
 		max(A_TOTAL_ADI_W1) as TOTAL_A,
 		max(B_V_TOTAL_ADI_W1) as TOTAL_B_VERB,
 		max(B_NV_TOTAL_ADI_W1) as TOTAL_B_NONVERB,
 		max(C_TOTAL_ADI_W1) as TOTAL_C,
 		max(D_TOTAL_ADI_W1) as TOTAL_D
 from OUTPUT.age
 group by AUTISM_ID;
QUIT;&lt;/PRE&gt;&lt;P&gt;Although it works, it seems inefficient considering how many variables I have. Is there a way to create some sort of DO LOOP or MACRO function that will run through all the variables and do it for me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate any feedback. Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Feb 2021 23:30:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Collapse-ID-while-keeping-the-max-value-of-the-column/m-p/717460#M9711</guid>
      <dc:creator>amarikow57</dc:creator>
      <dc:date>2021-02-07T23:30:13Z</dc:date>
    </item>
    <item>
      <title>issues with code, some data is skipped over when printing</title>
      <link>https://communities.sas.com/t5/SAS-Studio/issues-with-code-some-data-is-skipped-over-when-printing/m-p/716946#M9705</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;I am writing code and it seems that when I try to print all the rows in my dataline, some of the rows are being skipped over for some reason.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;libname saveit '/folders/myfolders';&lt;/DIV&gt;&lt;DIV&gt;data saveit.wtloss;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;input ID:$4. firstname: $15. lastname: $15. team: $8. startwt: $3. endwt: $3. loss ;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;loss=startwt-endwt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;datalines;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;1023 David Shaw &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; red &amp;nbsp; &amp;nbsp;189 165&lt;/DIV&gt;&lt;DIV&gt;1049 Amelia Serrano &amp;nbsp; &amp;nbsp; yellow 145 124&lt;/DIV&gt;&lt;DIV&gt;1219 Alan Nance &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; red &amp;nbsp; &amp;nbsp;210 192&lt;/DIV&gt;&lt;DIV&gt;1246 Ravi Sinha &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yellow 194 177&lt;/DIV&gt;&lt;DIV&gt;1078 Ashley McKnight &amp;nbsp; &amp;nbsp;red &amp;nbsp; &amp;nbsp;127 118&lt;/DIV&gt;&lt;DIV&gt;1221 Jim Brown &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;yellow 220 &amp;nbsp; .&lt;/DIV&gt;&lt;DIV&gt;1095 Susan Stewart &amp;nbsp; &amp;nbsp; &amp;nbsp;blue &amp;nbsp; 135 127&lt;/DIV&gt;&lt;DIV&gt;1157 Rosa Gomez &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; green &amp;nbsp;155 141&lt;/DIV&gt;&lt;DIV&gt;1331 Jason Schock &amp;nbsp; &amp;nbsp; &amp;nbsp; blue &amp;nbsp; 187 172&lt;/DIV&gt;&lt;DIV&gt;1067 Kanoko Nagasaka &amp;nbsp; &amp;nbsp;green &amp;nbsp;135 122&lt;/DIV&gt;&lt;DIV&gt;1251 Richard Rose &amp;nbsp; &amp;nbsp; &amp;nbsp; blue &amp;nbsp; 181 166&lt;/DIV&gt;&lt;DIV&gt;1333 Li-Hwa Lee &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; green &amp;nbsp;141 129&lt;/DIV&gt;&lt;DIV&gt;1192 Charlene Armstrong yellow 152 139&lt;/DIV&gt;&lt;DIV&gt;1352 Bette Long &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; green &amp;nbsp;156 137&lt;/DIV&gt;&lt;DIV&gt;1262 Yao Chen &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; blue &amp;nbsp; 196 180&lt;/DIV&gt;&lt;DIV&gt;1087 Kim Sikorski &amp;nbsp; &amp;nbsp; &amp;nbsp; red &amp;nbsp; &amp;nbsp;148 135&lt;/DIV&gt;&lt;DIV&gt;1124 Adrienne Fink &amp;nbsp; &amp;nbsp; &amp;nbsp;green &amp;nbsp;156 142&lt;/DIV&gt;&lt;DIV&gt;1197 Lynne Overby &amp;nbsp; &amp;nbsp; &amp;nbsp; red &amp;nbsp; &amp;nbsp;138 125&lt;/DIV&gt;&lt;DIV&gt;1133 John VanMeter &amp;nbsp; &amp;nbsp; &amp;nbsp;blue &amp;nbsp; 180 167&lt;/DIV&gt;&lt;DIV&gt;1036 Becky Redding &amp;nbsp; &amp;nbsp; &amp;nbsp;green &amp;nbsp;135 123&lt;/DIV&gt;&lt;DIV&gt;1057 Margie Vanhoy &amp;nbsp; &amp;nbsp; &amp;nbsp;yellow 146 132&lt;/DIV&gt;&lt;DIV&gt;1328 Hisashi Ito &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;red &amp;nbsp; &amp;nbsp;155 142&lt;/DIV&gt;&lt;DIV&gt;1243 Deanna Hicks &amp;nbsp; &amp;nbsp; &amp;nbsp; blue &amp;nbsp; 134 122&lt;/DIV&gt;&lt;DIV&gt;1177 Holly Choate &amp;nbsp; &amp;nbsp; &amp;nbsp; red &amp;nbsp; &amp;nbsp;141 130&lt;/DIV&gt;&lt;DIV&gt;1259 Raoul Sanchez &amp;nbsp; &amp;nbsp; &amp;nbsp;green &amp;nbsp;189 172&lt;/DIV&gt;&lt;DIV&gt;1017 Jennifer Brooks &amp;nbsp; &amp;nbsp;blue &amp;nbsp; 138 127&lt;/DIV&gt;&lt;DIV&gt;1099 Asha Garg &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;yellow 148 132&lt;/DIV&gt;&lt;DIV&gt;1329 Larry Goss &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yellow 188 174&lt;/DIV&gt;&lt;DIV&gt;;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;run ;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc sort data=saveit.wtloss;&lt;/DIV&gt;&lt;DIV&gt;by ID;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc print data=saveit.wtloss ;&lt;/DIV&gt;&lt;DIV&gt;run ;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;END CODE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and then when it prints, I attached an image of what shows up.&lt;/P&gt;&lt;P&gt;It seems that after 14 rows, the data is cut off.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 03:16:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/issues-with-code-some-data-is-skipped-over-when-printing/m-p/716946#M9705</guid>
      <dc:creator>ellpap</dc:creator>
      <dc:date>2021-02-05T03:16:14Z</dc:date>
    </item>
    <item>
      <title>SAS - Epic Systems (Medical EMR) Chronicles Access ?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SAS-Epic-Systems-Medical-EMR-Chronicles-Access/m-p/715894#M9703</link>
      <description>&lt;P&gt;re:&amp;nbsp;&lt;FONT&gt;SAS - Epic Systems (Medical EMR) Chronicles Access ?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I am aware and use SAS Studio with PROC SQL to access the Epic Clarity Data Base.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do some reporting within the Epic (Cache) Chronicles environment, accessing their INI and Items content.&lt;/P&gt;&lt;P&gt;Is there a way, method, tool to directly use SAS Enterprise or SAS Studio to connect and extract in some fashion&lt;/P&gt;&lt;P&gt;Epic data in Chronicles ? &amp;nbsp; Had to ask, hoping my question is specific enough to answer.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 22:10:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SAS-Epic-Systems-Medical-EMR-Chronicles-Access/m-p/715894#M9703</guid>
      <dc:creator>Greg_Azevedo_KP</dc:creator>
      <dc:date>2021-02-01T22:10:54Z</dc:date>
    </item>
    <item>
      <title>SAS Studio University Edition Tutorials</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SAS-Studio-University-Edition-Tutorials/m-p/715369#M9700</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I've been trying to learn SAS for some time now, bouncing around between different SAS books and using their On Demand for Academics, and University Edition. The problem is that the books often assume that you are using the licensed version, so what is depicted in the books rarely actually works in the free versions. The SAS Documentation is so difficult to understand. It appears to be written for people who are experts in SAS. I find the most informative and understandable tutorials and information to come from "non-SAS" sources. Why do they make SAS so difficult to learn? I am about ready to throw in the towel and stick with R and Python.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 16:49:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SAS-Studio-University-Edition-Tutorials/m-p/715369#M9700</guid>
      <dc:creator>DavidBrown</dc:creator>
      <dc:date>2021-01-29T16:49:58Z</dc:date>
    </item>
    <item>
      <title>F Test</title>
      <link>https://communities.sas.com/t5/SAS-Studio/F-Test/m-p/714693#M9691</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to find the appropriate code to run a F test to test a hypothesis but so far no luck&lt;/P&gt;&lt;P&gt;Here's the data:&lt;/P&gt;&lt;PRE&gt;data reghwk4; &lt;BR /&gt;input X Y;&lt;BR /&gt;datalines;&lt;BR /&gt;29.7 16.6 &lt;BR /&gt;68.4 49.1&lt;BR /&gt;120.7 121.7&lt;BR /&gt;217.2 219.6&lt;BR /&gt;313.5 375.5&lt;BR /&gt;419.1 570.8&lt;BR /&gt;535.9 648.2&lt;BR /&gt;641.5 755.6&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;This is what I have tried so far:&lt;/P&gt;&lt;PRE&gt;proc ttest data= reghwk4 / h0=0 sides=1;&lt;BR /&gt;class X;&lt;BR /&gt;var Y;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc anova data=reghwk4;&lt;BR /&gt;class Y X;&lt;BR /&gt;model Y=X;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc reg data= reghwk4;&lt;BR /&gt;model y=x;&lt;BR /&gt;run;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 18:15:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/F-Test/m-p/714693#M9691</guid>
      <dc:creator>Lilo</dc:creator>
      <dc:date>2021-01-27T18:15:08Z</dc:date>
    </item>
    <item>
      <title>I'd like to change the name of dataset of xpt files</title>
      <link>https://communities.sas.com/t5/SAS-Studio/I-d-like-to-change-the-name-of-dataset-of-xpt-files/m-p/712600#M9669</link>
      <description>&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;I'm using SAS studio.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;The environment is Windows 10.&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;I would to change the dataset name of an xpt file.&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;Anyone, could&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;&amp;nbsp;you give me the code to rename the dataset?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 07:20:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/I-d-like-to-change-the-name-of-dataset-of-xpt-files/m-p/712600#M9669</guid>
      <dc:creator>Shim1222</dc:creator>
      <dc:date>2021-01-20T07:20:42Z</dc:date>
    </item>
    <item>
      <title>How can i quckly access the snippet by entering @snippet-abbreviation in SAS 94?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-can-i-quckly-access-the-snippet-by-entering-snippet/m-p/711675#M9668</link>
      <description>&lt;P&gt;In Create snippet, they said&amp;nbsp;If I want to be able to quickly access the snippet by entering @snippet-abbreviation in the program editor, enter an abbreviation for the snippet. I can also add a description.&lt;/P&gt;&lt;P&gt;So I save the coding +@ snippet-name&amp;nbsp; in my snippet, and I try to use&amp;nbsp;@ or&amp;nbsp;@ snippet-name and click Tabs or Enter, but they are not show me anything? Did I make some mistake in here, I want to know why and how to add&amp;nbsp;@ snippet-name in my snippet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you,&lt;/P&gt;&lt;P&gt;HAHA604&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 14:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-can-i-quckly-access-the-snippet-by-entering-snippet/m-p/711675#M9668</guid>
      <dc:creator>HAHA604</dc:creator>
      <dc:date>2021-01-15T14:15:34Z</dc:date>
    </item>
    <item>
      <title>Problem when trying to declare an array</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Problem-when-trying-to-declare-an-array/m-p/710955#M9664</link>
      <description>&lt;P&gt;Here's some simple code that exemplifies an issue I'm having:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data;&lt;BR /&gt;array grid (3,3) row1-row3 col1-col3;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the error message I receive:&lt;/P&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;73 data;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74 array grid (3,3) row1-row3 col1-col3;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Too few variables defined for the dimension(s) specified for the array grid.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75 run;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;What can possibly be wrong?&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Thanks,&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Gene&lt;/DIV&gt;</description>
      <pubDate>Wed, 13 Jan 2021 00:33:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Problem-when-trying-to-declare-an-array/m-p/710955#M9664</guid>
      <dc:creator>genemroz</dc:creator>
      <dc:date>2021-01-13T00:33:55Z</dc:date>
    </item>
    <item>
      <title>PC SAS Batch Mode vs SAS Studio Background Mode</title>
      <link>https://communities.sas.com/t5/SAS-Studio/PC-SAS-Batch-Mode-vs-SAS-Studio-Background-Mode/m-p/710663#M9661</link>
      <description>&lt;P&gt;Hi all -&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to gather some information here: our team is planning to move away from developing with desktop PC SAS to SAS Studio on a Linux flavored SAS Server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;One topic that has come up is that SAS Studio (3.6 is what we have) does not run in "true" batch mode. Information I have found is that "background submit" is just a change in nomenclature starting with SAS Studio 3.6.&lt;/P&gt;&lt;P&gt;What I'd like to know is whether there any underlying difference in how PC SAS processes the old traditional "right click and select 'Batch submit with SAS 9.x'" vs submitting a job in background on SAS Studio?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One notable addition: using the SAS %sysprocessmode variable, results from PC SAS shows SAS Batch Mode, while running a background submit in SAS Studio 3.6 resolves to "SAS Workspace Server"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 19:43:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/PC-SAS-Batch-Mode-vs-SAS-Studio-Background-Mode/m-p/710663#M9661</guid>
      <dc:creator>jvigeant</dc:creator>
      <dc:date>2021-01-11T19:43:09Z</dc:date>
    </item>
    <item>
      <title>Setting a maximum value of a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Setting-a-maximum-value-of-a-variable/m-p/710466#M9656</link>
      <description>&lt;P&gt;I have an age variable and I would like to run an analysis only on 0-35 years of that variable. I want to include people who have an input of 40, for example, but only on the data for 0-35 for that person. I want to include that in some code that I already have, in which I am calculating the duration of smoking over a lifetime. I basically just want to limit it to exposure that happened before age 35. I have variables, hashlage1-4, which represent the last age of different periods of smoking throughout a lifetime. I'm not sure how (or if) I should use this variable, or if there is another way to set a maximum. I hope this makes sense. Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*duration*/&lt;BR /&gt;data work.adenovar;&lt;BR /&gt;set work.adeno1;&lt;BR /&gt;if hashtot &amp;gt;= 1 and hashtot &amp;lt; =4 and hashfage1 ^= 99 and hashlage1 ^= 99 then hashdur1 = (hashlage1-hashfage1)+1;&lt;BR /&gt;if hashtot &amp;gt;= 2 and hashtot &amp;lt;= 4 and hashfage2 ^= 99 and hashlage1 ^= 99 then hashdur2 = (hashlage2-hashfage2)+1;&lt;BR /&gt;if hashtot &amp;gt;= 3 and hashtot &amp;lt;= 4 and hashfage3 ^= 99 and hashlage1 ^= 99 then hashdur3 = (hashlage3-hashfage3)+1;&lt;BR /&gt;else if hashtot = 4 and hashfage4 ^= 99 and hashlage4 ^= 99 then hashdur4 = (hashlage4-hashfage4)+1;&lt;/P&gt;&lt;P&gt;/*total duration*/&lt;BR /&gt;hashdurtot = sum(of hashdur1-hashdur4);&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jan 2021 19:36:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Setting-a-maximum-value-of-a-variable/m-p/710466#M9656</guid>
      <dc:creator>gejoachim99</dc:creator>
      <dc:date>2021-01-10T19:36:09Z</dc:date>
    </item>
    <item>
      <title>Some macro functions are not parsed in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Some-macro-functions-are-not-parsed-in-SAS-Studio/m-p/710450#M9651</link>
      <description>&lt;P&gt;Dears:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some macro functions(e.g: %left() function) are not parsed in SAS Studio, but they are effective in SAS EG. And base SAS of both of them are 9.4_M6.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I wonder if I missed any global Settings in SAS Studio env?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find my code in below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc product_status;run;

data test1;
    i=1;
run;

data test2;
    i=2;
run;

data test3;
    i=3;
run;

proc sql ;
    create table t_test as 
    select * from  dictionary.tables where libname='WORK'; 

    select count(*) into:num from t_test where prxmatch('/^test/io',strip(memname));
;quit;

%macro test();
    data all;
        set test1 - test%left(&amp;amp;num.);
    run;
%mend;

%test;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas_eg.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53371i5C69ACCA5C477124/image-size/large?v=v2&amp;amp;px=999" role="button" title="sas_eg.png" alt="sas_eg.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas_studio.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53372i9D789E2512B03449/image-size/large?v=v2&amp;amp;px=999" role="button" title="sas_studio.png" alt="sas_studio.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jan 2021 15:08:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Some-macro-functions-are-not-parsed-in-SAS-Studio/m-p/710450#M9651</guid>
      <dc:creator>NickZhengCHN</dc:creator>
      <dc:date>2021-01-10T15:08:29Z</dc:date>
    </item>
    <item>
      <title>Logistic Regression for Twitter Data Scraping</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Logistic-Regression-for-Twitter-Data-Scraping/m-p/710060#M9642</link>
      <description>&lt;P&gt;HI there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to do a logistic regression for data i have scraped from a twitter advanced search, but it comes up with error everytime i run it, i believe this is due to the the fact that my all my value types come up as Char (character) and it needs to be Num (numbers) but my variables are&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Variables in Creation Order# Variable Type Len Format Informat12345678&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Field1&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;87&lt;/TD&gt;&lt;TD&gt;$87.&lt;/TD&gt;&lt;TD&gt;$87.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;TwitterHandle&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;77&lt;/TD&gt;&lt;TD&gt;$77.&lt;/TD&gt;&lt;TD&gt;$77.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Username&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;41&lt;/TD&gt;&lt;TD&gt;$41.&lt;/TD&gt;&lt;TD&gt;$41.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DateofTweet&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;104&lt;/TD&gt;&lt;TD&gt;$104.&lt;/TD&gt;&lt;TD&gt;$104.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;InResponseTo&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;$10.&lt;/TD&gt;&lt;TD&gt;$10.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Tweet&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;$12.&lt;/TD&gt;&lt;TD&gt;$12.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Comments&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;$1.&lt;/TD&gt;&lt;TD&gt;$1.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Retweets&lt;/TD&gt;&lt;TD&gt;Char&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;$1.&lt;/TD&gt;&lt;TD&gt;$1.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how should i go about changing this or am i not using an appropriate statistical technique for this type of data&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 21:50:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Logistic-Regression-for-Twitter-Data-Scraping/m-p/710060#M9642</guid>
      <dc:creator>gerry888</dc:creator>
      <dc:date>2021-01-07T21:50:16Z</dc:date>
    </item>
    <item>
      <title>Counting the occurrence of a variable across columns per observation</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Counting-the-occurrence-of-a-variable-across-columns-per/m-p/709718#M9634</link>
      <description>&lt;P&gt;I am new to SAS so forgive me if this is basic. I have a data set with 150,000+ rows, each with a unique ID, and 250 columns, all columns must be retained. However for this specific inquiry, I am only interested in 13 columns; each column is a variable with a valueof&amp;nbsp; "0" "1" "7" or "9". &amp;nbsp;I would like to make a new column that counts the number of times a "1" populates a column cell across the row/observation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&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;count of "1"&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Col1&amp;nbsp; &amp;nbsp; Col2&amp;nbsp; &amp;nbsp; &amp;nbsp;Col3&amp;nbsp; &amp;nbsp; Col4&amp;nbsp; &amp;nbsp; Col5&amp;nbsp; &amp;nbsp; &amp;nbsp;Col6&amp;nbsp; &amp;nbsp; &amp;nbsp; Col7&amp;nbsp; &amp;nbsp; Col8................&lt;STRONG&gt;WANT&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;152&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;&lt;P&gt;153&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;154&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;&lt;P&gt;155&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;&lt;P&gt;156&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/P&gt;&lt;P&gt;157&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&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;I have tried solutions from other forums with similar problems haven't found anything that has worked for me. I appreciate the help!!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 21:04:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Counting-the-occurrence-of-a-variable-across-columns-per/m-p/709718#M9634</guid>
      <dc:creator>kirkends</dc:creator>
      <dc:date>2021-01-06T21:04:11Z</dc:date>
    </item>
    <item>
      <title>put statement</title>
      <link>https://communities.sas.com/t5/SAS-Studio/put-statement/m-p/708801#M9617</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data perm_student;&lt;BR /&gt;input name$ age 2.;&lt;BR /&gt;cards; &lt;BR /&gt;afred 14&lt;BR /&gt;alice 13&lt;BR /&gt;barbara 13&lt;BR /&gt;carol 14&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data student;&lt;BR /&gt;set perm_student;&lt;BR /&gt;put name $15. @5 age 2.;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;it looks that 'put' does not work. The student dataset is only a simple copy of perm_student. could you help what is wrong?&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Dec 2020 21:20:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/put-statement/m-p/708801#M9617</guid>
      <dc:creator>anming</dc:creator>
      <dc:date>2020-12-30T21:20:35Z</dc:date>
    </item>
    <item>
      <title>Problem in Creating Libname  ECST142</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Problem-in-Creating-Libname-ECST142/m-p/708665#M9603</link>
      <description>&lt;P&gt;Hi Friends&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SAS Studio and having problem in creating Library for ECST142. Files are attached.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have already gone through all the ECST142 related queries in this forum but still struggling. I have also completed step by step instruction by SAS manual but still in vain.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe the issue must be in "format" of&amp;nbsp;&lt;STRONG&gt;ECST142&lt;/STRONG&gt;&amp;nbsp;and I have tried dozens of combination for FILEPATH like.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I lost the whole day banging my head in this stuff.........no clue. Please someone can help?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;homefolder=\ECST142\data;&lt;/PRE&gt;&lt;PRE&gt;C:\Users\RAO\Desktop\ECST142;&lt;/PRE&gt;&lt;PRE&gt;&lt;BR /&gt;C:\Users\RAO\Desktop\ECST142\data;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53090i4E2DF0DB76AB08BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.PNG" alt="1.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53091i78E6766FC21E9627/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.PNG" alt="2.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.PNG" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53092iBCCA3BB29D922908/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.PNG" alt="3.PNG" /&gt;&lt;/span&gt;Desktop\ECST142\data;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 23:09:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Problem-in-Creating-Libname-ECST142/m-p/708665#M9603</guid>
      <dc:creator>sascoin</dc:creator>
      <dc:date>2020-12-29T23:09:12Z</dc:date>
    </item>
    <item>
      <title>Not recognizing first level in categorical variable during logistic regression</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Not-recognizing-first-level-in-categorical-variable-during/m-p/708616#M9600</link>
      <description>&lt;P&gt;I am doing logistic regression using all categorical variables. When I create a 2x2 table of the outcome (casehyst_path) and the exposure (jointyears_cat), each level of jointyears_cat (0, 1, 2 and 3) all show up. But when I run the logistic regression, it ignores 0, and uses 1 as the reference, even though I specified ref=first. Here is my code, and I've attached screenshots of my results. Any help is appreciated! Thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data work.adeno1;&lt;BR /&gt;set work.adenovar;&lt;BR /&gt;if jointyears = 0 or hash = 2 then jointyears_cat = "0";&lt;BR /&gt;if 0 LT jointyears LE 2 then jointyears_cat = "1";&lt;BR /&gt;if 2 LT jointyears LE 5 then jointyears_cat = "2";&lt;BR /&gt;else if jointyears GT 5 then jointyears_cat = "3";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data work.adenovar;&lt;BR /&gt;set work.adeno1;&lt;BR /&gt;if 20 LE refage LE 34 then refagecat = "0";&lt;BR /&gt;if 35 LE refage LE 39 then refagecat = "1";&lt;BR /&gt;if 40 LE refage LE 44 then refagecat = "2";&lt;BR /&gt;if 45 LE refage LE 49 then refagecat = "3";&lt;BR /&gt;if 50 LE refage LE 54 then refagecat = "4";&lt;BR /&gt;else if 55 LE refage LE 59 then refagecat = "5";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if 36 LE hashlage1 LE 60 then before35 = "0";&lt;BR /&gt;else if 3 LE hashlage1 LE 35 then before35 = "1";&lt;BR /&gt;if 36 LE hashlage2 LE 60 then before35 = "0";&lt;BR /&gt;else if 3 LE hashlage2 LE 35 then before35 = "1";&lt;BR /&gt;if 36 LE hashlage3 LE 60 then before35 = "0";&lt;BR /&gt;else if 3 LE hashlage3 LE 35 then before35 = "1";&lt;BR /&gt;if 36 LE hashlage4 LE 60 then before35 = "0";&lt;BR /&gt;else if 3 LE hashlage4 LE 35 then before35 = "1";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq data = work.adenovar;&lt;BR /&gt;where before35 = "1";&lt;BR /&gt;tables jointyears_cat*casehyst_path / norow nopercent;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;title "hysterectomy controls age";&lt;BR /&gt;proc logistic data = adenovar descending;&lt;BR /&gt;where before35 = "1";&lt;BR /&gt;class jointyears_cat refagecat / param = ref ref = first;&lt;BR /&gt;model casehyst_path = jointyears_cat refagecat;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 18:18:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Not-recognizing-first-level-in-categorical-variable-during/m-p/708616#M9600</guid>
      <dc:creator>gejoachim99</dc:creator>
      <dc:date>2020-12-29T18:18:34Z</dc:date>
    </item>
    <item>
      <title>How to set default value in SAS Custom Task for SAS Server Path</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-set-default-value-in-SAS-Custom-Task-for-SAS-Server-Path/m-p/708467#M9599</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;I'm using the SASServerPath to read in a file. By default I would like the value to be blank, or something that I can control.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Currently when I use this:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt; %let file = ${fileSelector.fullPath};&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;I am getting this value below in the GUI by default. However, I know if someone else uses the task, the value would be different. How can I control it please? I would like to be able to select a SAS dataset, or keep the value blank.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;C:\Users\kharris\program.sas7bdat&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;This is the code I am using.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt; &amp;lt;Option name="fileSelector" inputType="sasserverpath" defaultFileName="pq1"&lt;BR /&gt;pathType="file" defaultExtension="sas7bdat"&amp;gt;An example of a SAS Server Path control.&lt;BR /&gt;This example allows the user to select a SAS program file.&amp;lt;/Option&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Many thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Kriss Harris&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 20:09:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-set-default-value-in-SAS-Custom-Task-for-SAS-Server-Path/m-p/708467#M9599</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2020-12-28T20:09:08Z</dc:date>
    </item>
    <item>
      <title>converting pdf file to sas table in sas studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/converting-pdf-file-to-sas-table-in-sas-studio/m-p/708203#M9588</link>
      <description>&lt;P&gt;Hello everybody&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;!&lt;/P&gt;&lt;P&gt;Please help me to solve my problem. I want to convert&amp;nbsp; pdf to sas table.&lt;/P&gt;&lt;P&gt;How i can do this? Can I convert pdf to sas&amp;nbsp; table direcly in my sas stydio?&lt;/P&gt;&lt;P&gt;Thanks a lot!!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 19:28:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/converting-pdf-file-to-sas-table-in-sas-studio/m-p/708203#M9588</guid>
      <dc:creator>kate-1mr</dc:creator>
      <dc:date>2020-12-25T19:28:36Z</dc:date>
    </item>
    <item>
      <title>SAS Custom Task - Obtain fullPath</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SAS-Custom-Task-Obtain-fullPath/m-p/707963#M9586</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using the SAS Server Path to read in a SAS dataset, and I would only like to obtain the&amp;nbsp;full path of the dataset location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the return value from the SAS Server Path, it shows me the &lt;STRONG&gt;path, name&lt;/STRONG&gt; and &lt;STRONG&gt;fullPath&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is, when I use this code: %let file = $fileSelector.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code is shown:&lt;/P&gt;
&lt;P&gt;%let file = {path=C:\Output, &lt;BR /&gt;name=pq1.sas7bdat, &lt;BR /&gt;fullPath=C:\Output\pq1.sas7bdat};&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I only would like to obtain the full path result, without having to subsequently use SUBSTR functions to obtain the value in fullPath. Do you know how I can achieve this please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is&amp;nbsp;some of the code that I used in my custom task:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;Option name="fileSelector" inputType="sasserverpath" defaultFileName="pq1"&lt;BR /&gt;pathType="file" defaultExtension="sas7bdat"&amp;gt;An example of a SAS Server Path control.&lt;BR /&gt;This example allows the user to select a SAS program file.&amp;lt;/Option&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kriss Harris&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2020 19:37:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SAS-Custom-Task-Obtain-fullPath/m-p/707963#M9586</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2020-12-23T19:37:11Z</dc:date>
    </item>
    <item>
      <title>limiting logistic regression to one group</title>
      <link>https://communities.sas.com/t5/SAS-Studio/limiting-logistic-regression-to-one-group/m-p/707725#M9583</link>
      <description>&lt;P&gt;I'm working with a dataset that has two control groups for reasons that I won't get into. I'm trying to do logistic regression on each of those separately - so, cases vs control group 1, then cases vs control group 2. What command do I use within my proc logistic to limit it to one group? Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 18:04:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/limiting-logistic-regression-to-one-group/m-p/707725#M9583</guid>
      <dc:creator>gejoachim99</dc:creator>
      <dc:date>2020-12-22T18:04:52Z</dc:date>
    </item>
    <item>
      <title>free practice question</title>
      <link>https://communities.sas.com/t5/SAS-Studio/free-practice-question/m-p/707320#M9580</link>
      <description>&lt;P&gt;this is a useful website providing some exercises: examtopics.com&lt;/P&gt;</description>
      <pubDate>Sun, 20 Dec 2020 23:15:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/free-practice-question/m-p/707320#M9580</guid>
      <dc:creator>anming</dc:creator>
      <dc:date>2020-12-20T23:15:20Z</dc:date>
    </item>
    <item>
      <title>length or format of a character variable in a data step</title>
      <link>https://communities.sas.com/t5/SAS-Studio/length-or-format-of-a-character-variable-in-a-data-step/m-p/705559#M9573</link>
      <description>&lt;P&gt;for a character variable, what is the difference between a length statement and a format statement, such as,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Length course $8;&lt;/P&gt;
&lt;P&gt;Format course $8.;&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Dec 2020 23:13:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/length-or-format-of-a-character-variable-in-a-data-step/m-p/705559#M9573</guid>
      <dc:creator>anming</dc:creator>
      <dc:date>2020-12-13T23:13:31Z</dc:date>
    </item>
    <item>
      <title>proc export file type</title>
      <link>https://communities.sas.com/t5/SAS-Studio/proc-export-file-type/m-p/705458#M9567</link>
      <description>&lt;P&gt;when we use proc export to export a as table to a certain file do we have to specify the file type?&lt;/P&gt;
&lt;P&gt;such as;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc export data=score.score_data (where=(gender='f'))&lt;BR /&gt;outfile='/folders/myfolders/Femalelist2.csv'&lt;BR /&gt;dbms=csv&lt;BR /&gt;replace;&lt;/P&gt;
&lt;P&gt;if we remove .csv from the output file, the file can still open in excel or notepad.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this is similar to a dlm file,&lt;/P&gt;
&lt;PRE&gt;proc export data=score.score_data&lt;BR /&gt;outfile="/folders/myfolders/sd.dat"&lt;BR /&gt;dbms=dlm&lt;BR /&gt;replace;&lt;BR /&gt;delimiter='&amp;amp;';&lt;BR /&gt;run; &lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;
&lt;P&gt;you can remove .dat and open the output sd file with notepad.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;proc export data=score.score_data&lt;BR /&gt;outfile='/folders/myfolders/sd_excel.xls'&lt;BR /&gt;dbms=XLSX replace;&lt;BR /&gt;sheet='data';&lt;BR /&gt;run;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for xlsx, it does not matter if you add .xls. the output is an excel file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Dec 2020 19:56:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/proc-export-file-type/m-p/705458#M9567</guid>
      <dc:creator>anming</dc:creator>
      <dc:date>2020-12-12T19:56:11Z</dc:date>
    </item>
    <item>
      <title>My SAS studio stopped working</title>
      <link>https://communities.sas.com/t5/SAS-Studio/My-SAS-studio-stopped-working/m-p/705410#M9566</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Sorry if my problem is minor, but i can't solve it. I am a new user of SAS studio and Programming. Today I worked in my SAS studio and I thought I made a mistake - I try to open the Excel file&amp;nbsp; as a text viewer. After that, my SAS studio stopped working and Google gave an error: RESULT_CODE_HUG.&lt;/P&gt;&lt;P&gt;I tried to follow the instructions to remove the error - I deleted cookies, restarted Google and computer, but unfortunately my SAS studio did not work.&lt;/P&gt;&lt;P&gt;Please tell me how I can solve my problem.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 22:43:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/My-SAS-studio-stopped-working/m-p/705410#M9566</guid>
      <dc:creator>kate-1mr</dc:creator>
      <dc:date>2020-12-11T22:43:53Z</dc:date>
    </item>
    <item>
      <title>How do I transfer my snippets from SAS Studio in SAS University Edition to SAS OnDemand for Acad.?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-do-I-transfer-my-snippets-from-SAS-Studio-in-SAS-University/m-p/705290#M9565</link>
      <description>&lt;P&gt;Dear all&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a useful collection of snippets under the 'My Snippets' menu in SAS Studio for SAS University Edition that I compiled over time. Since SAS University Edition will be discontinued next year, I'm beginning to use SAS onDemand for Academics, and I'd like to be able to access my existing snippets in SAS onDemand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you know of a way to transfer those snippets from the SAS Studio in SAS University Edition to the SAS Studio in SAS onDemand?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you ahead&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tony&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2020 12:04:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-do-I-transfer-my-snippets-from-SAS-Studio-in-SAS-University/m-p/705290#M9565</guid>
      <dc:creator>tonybesas</dc:creator>
      <dc:date>2020-12-11T12:04:30Z</dc:date>
    </item>
    <item>
      <title>Uninitialized variable</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Uninitialized-variable/m-p/704300#M9552</link>
      <description>&lt;P&gt;I am using an existing dataset to create a bunch of new variables, all to make one final variable. I have that final variable in a continuous form (jointyears), and I want to make it categorical (jointyears_cat). I've used if/then statements to do so. However, the log is telling me when I run the if/then statements, that the categorical variable, jointyears, is uninitialized, even though I created it immediately before and included a data and a set statement. I also ran a proc contents for work.adenovar and work.adeno1, and in each the variables that I need/are coding with are all present. Here is my code/log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="dijitContentPane dijitBorderContainer-child dijitBorderContainer-dijitContentPane dijitBorderContainerPane dijitAlignCenter dijitContentPaneSingleChild"&gt;&lt;DIV class="dijitBorderContainer dijitContainer row-fluid dijitLayoutContainer"&gt;&lt;DIV class="dijitContentPane dijitAlignCenter dijitContentPaneSingleChild dijitBorderContainer-child dijitBorderContainer-dijitContentPane dijitBorderContainerPane"&gt;&lt;DIV class="tabs dijitBorderContainer dijitContainer dojoDndTarget sasStudioTabsParentContainer dijitLayoutContainer dojoDndContainerOver"&gt;&lt;DIV class="dijitTabContainer dijitTabContainerTop dijitContainer dijitLayoutContainer tabStrip-disabled sasStudioTabsTabContainer sasStudioTabsTabContainerVertical sasStudioTabsTop dijitBorderContainer-child dijitBorderContainer-dijitTabContainerTop dijitBorderContainerPane dijitAlignCenter"&gt;&lt;DIV class="dijitTabPaneWrapper dijitTabContainerTop-container dijitAlignCenter"&gt;&lt;DIV class="dijitTabContainerTopChildWrapper dijitVisible"&gt;&lt;DIV class="dijitBorderContainer dijitContainer sasStudioTabsTabContainerChild dijitTabPane dijitTabContainerTop-child dijitTabContainerTop-dijitBorderContainer dijitLayoutContainer"&gt;&lt;DIV class="dijitBorderContainer dijitContainer dojoDndTarget dijitBorderContainer-child dijitBorderContainer-dijitBorderContainer dijitBorderContainerPane dijitAlignCenter dijitLayoutContainer dojoDndContainerOver"&gt;&lt;DIV class="dijitTabContainer dijitTabContainerTop dijitContainer dijitLayoutContainer tabStrip-disabled sasSuiteTabs dijitBorderContainer-child dijitBorderContainer-dijitTabContainerTop dijitBorderContainerPane dijitAlignCenter"&gt;&lt;DIV class="dijitTabPaneWrapper dijitTabContainerTop-container dijitAlignCenter"&gt;&lt;DIV class="dijitTabContainerTopChildWrapper dijitVisible"&gt;&lt;DIV class="dijitBorderContainer dijitContainer dijitTabPane dijitTabContainerTop-child dijitTabContainerTop-dijitBorderContainer dijitLayoutContainer"&gt;&lt;DIV class="dijitBorderContainer dijitContainer dijitBorderContainer-child dijitBorderContainer-dijitBorderContainer dijitBorderContainerPane dijitAlignCenter dijitLayoutContainer"&gt;&lt;DIV class="dijitContentPane dijitBorderContainer-child dijitBorderContainer-dijitContentPane dijitBorderContainerPane dijitAlignCenter"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;73 /*duration*/&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74 data work.adenovar;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75 set work.adeno1;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;76 if hashtot &amp;gt;= 1 and hashtot &amp;lt; =4 and hashfage1 ^= 99 and hashlage1 ^= 99 then hashdur1 = (hashlage1-hashfage1)+1;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;77 if hashtot &amp;gt;= 2 and hashtot &amp;lt;= 4 and hashfage2 ^= 99 and hashlage1 ^= 99 then hashdur2 = (hashlage2-hashfage2)+1;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;78 if hashtot &amp;gt;= 3 and hashtot &amp;lt;= 4 and hashfage3 ^= 99 and hashlage1 ^= 99 then hashdur3 = (hashlage3-hashfage3)+1;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;79 else if hashtot = 4 and hashfage4 ^= 99 and hashlage4 ^= 99 then hashdur4 = (hashlage4-hashfage4)+1;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;80&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;81 /*total duration*/&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;82 hashdurtot = sum(of hashdur1-hashdur4);&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;83&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;84 /*convert all times to days*/&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;85 if hashnumx1 = 1 then hashnumx1_day = "1";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;86 if hashnumx1 = 2 then hashnumx1_day = "7";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;87 if hashnumx1 = 3 then hashnumx1_day = "30";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;88 if hashnumx1 = 4 then hashnumx1_day = "365.25";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;89 if hashnumx1 = 5 then hashnumx1_day = "1";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;90 else if 8 &amp;gt; hashnumx1 &amp;gt; 9 then hashnumx1_day = ".";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;91 if hashnumx2 = 1 then hashnumx2_day = "1";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;92 if hashnumx2 = 2 then hashnumx2_day = "7";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;93 if hashnumx2 = 3 then hashnumx2_day = "30";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;94 if hashnumx2 = 4 then hashnumx2_day = "365.25";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;95 if hashnumx2 = 5 then hashnumx2_day = "1";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;96 else if 8 &amp;gt; hashnumx2 &amp;gt; 9 then hashnumx2_day = ".";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;97 if hashnumx3 = 1 then hashnumx3_day = "1";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;98 if hashnumx3 = 2 then hashnumx3_day = "7";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;99 if hashnumx3 = 3 then hashnumx3_day = "30";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;100 if hashnumx3 = 4 then hashnumx3_day = "365.25";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;101 if hashnumx3 = 5 then hashnumx3_day = "1";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;102 else if 8 &amp;gt; hashnumx3 &amp;gt; 9 then hashnumx3_day = ".";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;103 if hashnumx4 = 1 then hashnumx4_day = "1";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;104 if hashnumx4 = 2 then hashnumx4_day = "7";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;105 if hashnumx4 = 3 then hashnumx4_day = "30";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;106 if hashnumx4 = 4 then hashnumx4_day = "365.25";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;107 if hashnumx4 = 5 then hashnumx4_day = "1";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;108 else if 8 &amp;gt; hashnumx4 &amp;gt; 9 then hashnumx4_day = ".";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;109&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;110 /*inhalations/day calculation*/&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;111 /*1ep*/ if hashtot = 1 then inhl_day = ((hashinhl1*hashnum1)/hashnumx1_day);&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;112 /*2ep*/ if hashtot = 2 then inhl_day = ((hashinhl1*hashnum1)/hashnumx1_day) + ((hashinhl2*hashnum2)/hashnumx2_day);&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;113 /*3ep*/ if hashtot = 3 then inhl_day = ((hashinhl1*hashnum1)/hashnumx1_day) + ((hashinhl2*hashnum2)/hashnumx2_day) +&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;113 ! ((hashinhl3*hashnum3)/hashnumx3_day);&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;114 /*4ep*/ if hashtot = 4 then inhl_day = ((hashinhl1*hashnum1)/hashnumx1_day) + ((hashinhl2*hashnum2)/hashnumx2_day) +&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;114 ! ((hashinhl3*hashnum3)/hashnumx3_day) + ((hashinhl4*hashnum4)/hashnumx4_day);&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;115 else if 98 &amp;gt; hashtot &amp;gt; 99 then inhl_day = ".";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;116&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;117 /*inhalations/day to joints/day*/&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;118 joints_day = (inhl_day / 12);&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;119&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;120 /*joint years calculation*/&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;121 jointyears = joints_day * hashdurtot;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;122 run;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;111:62 112:62 112:101 113:62 113:101 113:140 114:62 114:101 114:140 114:179 115:43&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Missing values were generated as a result of performing an operation on missing values.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;403 at 82:14 4 at 111:61 404 at 118:24 407 at 121:25&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: There were 989 observations read from the data set WORK.ADENO1.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The data set WORK.ADENOVAR has 989 observations and 2961 variables.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.07 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.07 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;123&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;124 data work.adenovar;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;125 set work.adeno1;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;126 if jointyears = 0 then jointyears_cat = "0";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;127 if 0 &amp;gt; jointyears &amp;gt;= 2 then jointyears_cat = "1";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;128 if 2 &amp;gt; jointyears &amp;gt;= 5 then jointyears_cat = "2";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;129 else if jointyears &amp;gt; 5 then jointyears_cat = "3";&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;130 run;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable jointyears is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: There were 989 observations read from the data set WORK.ADENO1.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The data set WORK.ADENOVAR has 989 observations and 2951 variables.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: DATA statement used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.06 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.06 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;131&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;132 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;144&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;Please help!! Thank you.&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Dec 2020 22:01:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Uninitialized-variable/m-p/704300#M9552</guid>
      <dc:creator>gejoachim99</dc:creator>
      <dc:date>2020-12-07T22:01:31Z</dc:date>
    </item>
    <item>
      <title>YRDIF function not working for some observations</title>
      <link>https://communities.sas.com/t5/SAS-Studio/YRDIF-function-not-working-for-some-observations/m-p/704015#M9550</link>
      <description>&lt;P&gt;Hi SAS communities,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I match merged 4 data sets into one. There should only be 1 observation per person, which includes the most recent visit. One data set had a Birth Date variable and another data set had a Visit Date variable. After merging all 4 I then had to create a new variable that shows what age the person was between Birth date and Visit Date. Below is my code and I think I did the code correctly, but in the log, it shows that 2 out of the 573 are missing data. I checked the data sets and they show both the Birth date and Visit date. It could possibly be the way I also made the 4 data sets, but want to know ifs a simple coding mistake. Below is my code and a screenshot of the partial log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="Screen Shot 2020-12-06 at 6.43.32 PM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52378iB2640DCE55AE4FCF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-12-06 at 6.43.32 PM.png" alt="Screen Shot 2020-12-06 at 6.43.32 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if you need more information&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 15:11:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/YRDIF-function-not-working-for-some-observations/m-p/704015#M9550</guid>
      <dc:creator>cris17</dc:creator>
      <dc:date>2020-12-10T15:11:28Z</dc:date>
    </item>
    <item>
      <title>SAS Base programming 1 Lesson 3</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SAS-Base-programming-1-Lesson-3/m-p/702923#M9547</link>
      <description>&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Type&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Frequency&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Percent&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Cumulative&lt;BR /&gt;Frequency&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Cumulative&lt;BR /&gt;Percent&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;NM&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;63&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;46.67&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;63&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;46.67&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;NP&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;51&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;37.78&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;114&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;84.44&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;NPRE&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0.74&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;115&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;85.19&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;NS&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;10&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;7.41&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;125&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;92.59&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;PRE&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2.22&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;128&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;94.81&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;PRESERVE&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2.96&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;132&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;97.78&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;RIVERWAYS&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;0.74&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;133&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;98.52&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;RVR&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1.48&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;135&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;100.00&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For level 2 practice of lesson 3, I generated the table above by proc freq. The answer is that&amp;nbsp;&lt;EM&gt;NPRE&lt;/EM&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;PRESERVE&lt;/EM&gt;&lt;SPAN&gt;, and&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;RIVERWAYS&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;are invalid values for&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Type&lt;/STRONG&gt;&lt;SPAN&gt;. I do not understand why. Has anyone worked on the relevant codes?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 23:09:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SAS-Base-programming-1-Lesson-3/m-p/702923#M9547</guid>
      <dc:creator>anming</dc:creator>
      <dc:date>2020-12-01T23:09:37Z</dc:date>
    </item>
    <item>
      <title>SAS programming 1 data package</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SAS-programming-1-data-package/m-p/702720#M9544</link>
      <description>&lt;P&gt;There are only 13 datasets in the data package of SAS programming 1 (pg1V2).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anming_2-1606793959553.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52196i9B1B0C386B4C85F7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="anming_2-1606793959553.png" alt="anming_2-1606793959553.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone can provide the full datasets? I can not see any .sas7bdat. There are no storm_summary, eu_occ, np_summary, np_species used for courses. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 03:41:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SAS-programming-1-data-package/m-p/702720#M9544</guid>
      <dc:creator>anming</dc:creator>
      <dc:date>2020-12-01T03:41:12Z</dc:date>
    </item>
    <item>
      <title>SAS Programming 1 Lesson 5: IDGROUP query</title>
      <link>https://communities.sas.com/t5/SAS-Studio/SAS-Programming-1-Lesson-5-IDGROUP-query/m-p/702240#M9539</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have question pertaining to the challenger question in SAS programming 1 Lesson 5 - Analyzing and Reporting on Data.&lt;/P&gt;&lt;P&gt;Image below shows the solution to the "Challenger" practice of Topic "Creating Summary Reports and Data".&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-11-29 131656.png" style="width: 782px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/52078iF46DD9B7CF79E1F4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-11-29 131656.png" alt="Screenshot 2020-11-29 131656.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My question:&lt;/P&gt;&lt;P&gt;Why didn't the proc means step creating the output of top 3 parks grouped by REGION and YEARS?&lt;/P&gt;&lt;P&gt;The answer for 188594 is the third highest number of park visitors in Alaska region in the month of &lt;U&gt;&lt;STRONG&gt;JUNE&lt;/STRONG&gt;&lt;/U&gt; of year 2010.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I were to sum the total of visitors by YEARS and REGION, what would the code look like?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siroo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Nov 2020 05:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/SAS-Programming-1-Lesson-5-IDGROUP-query/m-p/702240#M9539</guid>
      <dc:creator>Siroo</dc:creator>
      <dc:date>2020-11-29T05:24:13Z</dc:date>
    </item>
    <item>
      <title>Calculating counts and percentages with conditions</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Calculating-counts-and-percentages-with-conditions/m-p/702154#M9535</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Could someone help me with the code to solve this problem?&lt;/P&gt;
&lt;P&gt;From data oc below, I would like to select the industry code(indscode) with the following conditions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(1) In which at least 50% of the jobs are exposed to agent a(0=unexposed, 1=exposed).[I want all percentages to be displayed and from there I will select the &amp;gt;=50%].&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(2) Couting number of subjects( lung cases(case) and controls(cont) for the selected indscode.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used proc SQL, expecting the indscode variable to be displayed on the table results, but it didn't.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Coding help is needed to have the indscode&amp;nbsp; count and % displayed on the table,please.&lt;/P&gt;
&lt;P&gt;Please find my code and&amp;nbsp; results below:&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;
&lt;P&gt;ak.&lt;/P&gt;
&lt;P&gt;data oc; &lt;BR /&gt;input id$ 1-5 job 6-7 a 8-9 b 10-11 indscode 12-16 lung$ 17-21; &lt;BR /&gt;datalines;&lt;BR /&gt;OS1 3 1 0 6198 case&lt;BR /&gt;OS2 2 1 1 6191 cont&lt;BR /&gt;OS3 3 1 0 6191 case&lt;BR /&gt;OS4 3 0 0 6198 cont&lt;BR /&gt;OS5 3 1 0 6191 case&lt;BR /&gt;OS6 3 1 0 6191 cont&lt;BR /&gt;OS6 4 1 1 6198 case&lt;BR /&gt;OS7 4 1 1 6191 case&lt;BR /&gt;OS8 1 1 1 6191 cont&lt;BR /&gt;OS9 1 0 0 6198 cont&lt;BR /&gt;OS10 1 1 1 6191 cont&lt;BR /&gt;OS11 3 1 1 4153 case&lt;BR /&gt;OS12 1 1 1 6191 case&lt;BR /&gt;OS13 3 1 1 8563 case&lt;BR /&gt;OS14 1 1 1 6191 case&lt;BR /&gt;OS14 2 0 0 6191 cont&lt;BR /&gt;OS14 5 1 1 6191 cont&lt;BR /&gt;OS15 1 1 1 4153 cont&lt;BR /&gt;OS16 1 1 0 8563 case&lt;BR /&gt;OS17 4 1 1 6191 case&lt;BR /&gt;OS17 2 1 0 6191 case&lt;BR /&gt;OS17 3 1 0 6191 cont&lt;BR /&gt;OS20 3 1 1 4153 cont&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;create table want as&lt;BR /&gt;select job, count(job)/(select count(*) from oc) as pct format=percent.&lt;BR /&gt;from oc where a=1 /*a=0 is unexposed to agent a; 1= exposed to agent a*/&lt;BR /&gt;group by indscode;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;proc print data=want;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Obs job pct&lt;BR /&gt;1 3 13%&lt;BR /&gt;2 3 13%&lt;BR /&gt;3 1 13%&lt;BR /&gt;4 5 57%&lt;BR /&gt;5 1 57%&lt;BR /&gt;6 3 57%&lt;BR /&gt;7 1 57%&lt;BR /&gt;8 3 57%&lt;BR /&gt;9 1 57%&lt;BR /&gt;10 4 57%&lt;BR /&gt;11 2 57%&lt;BR /&gt;12 4 57%&lt;BR /&gt;13 3 57%&lt;BR /&gt;14 2 57%&lt;BR /&gt;15 3 57%&lt;BR /&gt;16 1 57%&lt;BR /&gt;17 4 9%&lt;BR /&gt;18 3 9%&lt;BR /&gt;19 3 9%&lt;BR /&gt;20 1 9%&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Nov 2020 04:57:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Calculating-counts-and-percentages-with-conditions/m-p/702154#M9535</guid>
      <dc:creator>ak2011</dc:creator>
      <dc:date>2020-11-28T04:57:14Z</dc:date>
    </item>
    <item>
      <title>Using SAS studio trying to delete observations</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Using-SAS-studio-trying-to-delete-observations/m-p/702065#M9530</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with a large dataset and trying to subset the data to only keep certain variables, I am only looking at a certain age range for the data too so I want to delete the ages that I do not need. My code for this isn't working and I'm not sure why.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data nsch1718;
if  2=&amp;gt;SC_AGE_YEARS&amp;gt;5 then delete;
keep ACEct_1718 PrntNativity_1718 TalkAbout_1718 WrkToSolve_1718 strengths_1718 hopeful_1718 CtFamRes_1718 FamResilience_1718 
confident_1718 ACEdivorce_1718 ACEdeath_1718 ACEjail_1718 ACEdomviol_1718 ACEneighviol_1718 ACEmhealth_1718 ACEdrug_1718 ACEdiscrim_1718
sex_1718 SC_AGE_YEARS SC_HISPANIC_R SC_RACE_R raceAsia_1718 povSCHIP_1718 FPL_I1 AdultEduc_1718 FamCount_1718 RecogLetter_1718 
CountTo_1718 CONFIDENT WorkToFin_1718 HurtSad_1718 WriteName_1718;
format CONFIDENT confidentf. prntnativity_1718 prntnativityf. confident_1718 confidentf.;
set mc759.nsch1718combined_drc;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 27 Nov 2020 17:07:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Using-SAS-studio-trying-to-delete-observations/m-p/702065#M9530</guid>
      <dc:creator>ayosas</dc:creator>
      <dc:date>2020-11-27T17:07:51Z</dc:date>
    </item>
    <item>
      <title>Can't copy paste from Mac into SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Can-t-copy-paste-from-Mac-into-SAS-Studio/m-p/701711#M9526</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm new to SAS but trying to learn using SAS Studio (running in Chrome). I use a Mac and when I try to paste text from the system clipboard (e.g. code I find online somewhere) the moment I hit the command key (command-V) the SAS Studio pop-up menu appears. I don't think I've done anything&amp;nbsp;weird with my keyboard settings that should cause that behaviour.&lt;/P&gt;&lt;P&gt;Any ideas? I can't figure out why I can't paste from the Mac side to the SAS browser side.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 22:31:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Can-t-copy-paste-from-Mac-into-SAS-Studio/m-p/701711#M9526</guid>
      <dc:creator>paulgs</dc:creator>
      <dc:date>2020-11-25T22:31:00Z</dc:date>
    </item>
    <item>
      <title>model market share with proc logistic?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/model-market-share-with-proc-logistic/m-p/700969#M9517</link>
      <description>&lt;P&gt;We need to model the market share of a certain brand in a certain store at a given time. According to what we have learned, logistic models are often used when the dependent variable is marketshare as the natural maximum is 100%. However, when we use proc logistic in sas, we get impossible outputs. The reason for this might be the fact that in order to use proc logistic, you need an event and a non-event.&lt;/P&gt;&lt;P&gt;Do you have any idea which sas procedure to use instead? Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 16:43:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/model-market-share-with-proc-logistic/m-p/700969#M9517</guid>
      <dc:creator>magalineven</dc:creator>
      <dc:date>2020-11-23T16:43:12Z</dc:date>
    </item>
    <item>
      <title>How to explicitly set a port for SAS Studio 3.8 in Windows 10 ?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/How-to-explicitly-set-a-port-for-SAS-Studio-3-8-in-Windows-10/m-p/700644#M9516</link>
      <description>&lt;P&gt;There is already a question regarding this topic (&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-explicitly-set-a-port-for-SAS-Studio-4-x/ta-p/601708" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-explicitly-set-a-port-for-SAS-Studio-4-x/ta-p/601708&lt;/A&gt;) but it appears to be geared towards the VM/Unix version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to set the default port for SAS Studio Single User running on Windows 10, so every time I open SAS Studio, it uses the same port on localhost.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2020 04:00:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/How-to-explicitly-set-a-port-for-SAS-Studio-3-8-in-Windows-10/m-p/700644#M9516</guid>
      <dc:creator>zpc</dc:creator>
      <dc:date>2020-11-21T04:00:23Z</dc:date>
    </item>
    <item>
      <title>Census Bureau CPS data w Supplement via census.gov or IPUMS?</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Census-Bureau-CPS-data-w-Supplement-via-census-gov-or-IPUMS/m-p/700082#M9506</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I know nothing of programming and working with data like this. The US Census Bureau website has .xlsx tables that relate family income to voter turnout and reasons for not voting, using CPS data from Nov 2018, and I guess preceding months, plus their Voting and Registration Supplement. There are what looks like .dat purely numerical fixed width documents of this data on the Census website, and I guess there may be various renditions of the same info on cps.ipums.org. How may this information be viewed in a similar format to the .xlsx tables for a single state? Is this practical on SAS Studio? Thank You &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 03:27:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Census-Bureau-CPS-data-w-Supplement-via-census-gov-or-IPUMS/m-p/700082#M9506</guid>
      <dc:creator>ButteryBatman</dc:creator>
      <dc:date>2020-11-19T03:27:34Z</dc:date>
    </item>
  </channel>
</rss>

