Creating an AI Assistant for SAS Viya in 5 steps (@sassoftware/viya-assistantjs) - Part I
Recent Library Articles
Recently in the SAS Community Library: SAS' @kumardeva debunks the myth that developing AI assistants is too hard. He shows you how to use the @sassoftware/viya-assistantjs library to jump start your development.
Hi, I have a job flow set up. One of the jobs has a warning (but not an error and does not fail). In this scenario the next job in the flow after the one with the warning does not start and I think this is because of the previous job having a return code. One used to be able to control this in LSF but how does one do this in Viya Flows so that the next job would start and accept a job with warnings as a complete job? I have tried abort 0 in my code which works but this changes the job status to 'Cancelled' which is not ideal. Thanks Andre
... View more
Hi,
I took the SAS 9.4 Base Certification practice exam. Below are the steps for question 13.
This project will use data set cert.input36. At any time, you may save your program as program36 in cert\programs. Write a SAS program that will clean the data in cert.input36 as follows:
Step 1:
create a temporary data set, cleandata36.
In this data set, convert all group values to upper case.
Then keep only observations with group equal to 'A' or 'B'.
Step 2:
Determine the MEDIAN value for the Kilograms variable for each group (A,B) in the cleandata36 data set. Round MEDIAN to the nearest whole number.
Step 3:
create results.output36 from cleandata36
Ensure that all values for variable Kilograms are between 40 and 200, inclusively.
If the value is missing or out of range, replace the value with the MEDIAN Kilograms value for the respective group (A,B) calculated in step 2.
How many observations are in results.output36?
The original dataset had 5000 observations.
My answer was 4897 observations.
The practice exam has 4992 observations for the answer.
I can't figure out why there is a 95 observation difference.
I did answer the second question regarding the median correctly.
Thanks for your help.
I used the following code:
data cleandata36; set cert.input36; group = upcase(group); where group in ('A' 'B'); run;
proc means data=cleandata36 median maxdec=0; class group; var kilograms; run;
data results.output36; set cleandata36; if Group = 'A' and kilograms lt 40 or kilograms gt 200 then kilograms = 79; if Group = 'B' and kilograms lt 40 or kilograms gt 200 then kilograms = 89; run;
proc means data=results.output36 maxdec= 2 min max mean median n; class group; var kilograms; run;
The answer code is: data work.cleandata36; set cert.input36; group=upcase(group); if group in ('A','B'); run;
proc means data=work.cleandata36 median;
class group;
var kilograms;
run;
data results.output36;
set cleandata36;
if Kilograms < 40 or Kilograms > 200 then do;
if group='A' then kilograms=79;
else kilograms=89;
end;
run;
proc contents data=results.output36;
... View more
I have done something to move the action buttons (e.g., save, run) from the main menu bar at the top of the SAS window (9.4, Windows version) to their own, separate window. Because I don't know what I did to cause that, I don't know how to reverse it! I have perused the web and SAS documentation, but I have had no luck. Does anyone know how to move the action buttons back into the main menu bar? Thanks in advance!
... View more
hello. I am a SAS beginner. I have an experimental group, and I need to build a control group. A control group must be created by matching control group subjects 1:1 based on two variables: age and sex of the experimental group. Matching should be done using only those two variables, not the propensity score. Should I use proc psmatch or inner join? I would appreciate it if you could provide detailed code.
... View more