An update is available for SAS Viya 3.4.
Published 20May2024
Issue(s) addressed:
SAS Note 70799: 'ERROR: Could not create sasenv.cfg...' occurs when trying to deploy a SAS® Embedded Process for Greenplum version 7
For a complete list of SAS Viya updates available, visit the SAS Viya Updates Page.
... View more
Hello, I am trying to figure out how to expand a dataset by creating a new row for each year between a start date and end date and find the age the person is at each year between those 2 dates. I have tried a couple of things without success. I have tried to modify this code: https://stackoverflow.com/questions/47428867/how-to-create-additional-rows-for-each-day-between-two-dates-in-sas.Though the code ran successfully without errors, I did not get the intended results. It incremented the first observation's start date, and I need the first observation's start date to remain unchanged. I am not certain how to proceed. Any assistance would be appreciated. I am using SAS9.4.
... View more
I have a dataset where the same sample ID is associated with two components (a and b), it also contains singular data (c). I'm trying to add a column that counts the number of occurrences of the ID so I can identify when I only have one of the two components. I'm trying to create the Count column in the table below so I could identify the unpaired component (in red text) using an if then statement (if Comp eq "a" and Count ne 2 then) and (if Comp eq "b" and Count ne 2 then). Comp ID Count c 5236 1 a 3298 2 b 3298 2 a 4172 1 a 8723 2 b 8723 2 c 7692 1 If it were in Excel, it could be done using the COUNTIF function and dragging it down (=COUNTIF(B:B,B2)) Unfortunately I don't even know where to begin to do this in SAS and haven't had any luck Googling it. I would appreciate any direction you could give me.
... View more
Hi. I'm working with doses of limestone and styding soil pH. My model is a quadratic polynomial and I did a scatterplot in PROC SGPLOT. But I want to know if I can put the equation inside of the graph. How can I do that? I know how to do in Excell, but in the SAS on Demand I don't know if it's possible. Below is the code line that I used. Thanks for the helpful. proc sgplot data=mydata noautolegend; title height=11pt color=black "soil pH vs limestone"; scatter Y=pH X=DOSE; yaxis label="pH"; xaxis min=0 max=1.92 values=(0 0.48 0.96 1.44 1.92) label="Limestone (t/ha)"; REG Y=pH X=DOSE/degree=2; keylegend / location=inside position=top across=5 down=3 titleattrs=(wight=bold size=9pt) valueattrs=(collor=black size=7pt); run;
... View more
Hi there,
I am trying to create a csv file that has both the variable names of the dataset and another line as the header. It should look like below.
I have tried proc export, ods csvall, and a data _null_ statement but can't seem to get it to work. Examples of my code below. Is there a way to add in the ndar_subject line header while keeping the variable names as the headers below? If I could get the variable names as a header in the data _null_ step that would be ideal, but I have not been able to figure this out.
%let header1 = %str(ndar_subject,1);
%put &header1; data _null_; file "R:\tsanche\REALM Data\Data\SAS Created Data\Data Repository\July 2024 CSV Upload Files\REALM Subject and Pedigree July 2024.csv" dsd; set repdata.pedig;
if _n_ = 1 then do; put "&header1"; end;
put (_all_)(+0); run;
proc export data=repdata.pedig outfile='R:\tsanche\REALM Data\Data\SAS Created Data\Data Repository\July 2024 CSV Upload Files\REALM Subject and Pedigree July 2024.csv' dbms=csv replace; run;
ods csvall file="R:\tsanche\REALM Data\Data\SAS Created Data\Data Repository\July 2024 CSV Upload Files\REALM Subject and Pedigree July 2024.csv"; proc report data=repdata.pedig; run; ods csvall close;
Thanks in advance!
... View more