Recently in the SAS Community Library: SAS' @Sundaresh1 highlights a sometimes overlooked task when applying document embeddings for purposes of similarity-based search. Normalisation of vectors helps obtain relevant matches.
Hello, I know that i can use INTCK on studio but i want to know if i can find a formula in visual Analytics to measure the delay between 2 dates and exclude the week end or blank days.
... View more
I have a exported an excel report that contains empty cells and would like to write a code that would color all empty cells in the excel output. I have the following code which only highlights/colors empty cells in the NAME column, however I'd like to highlight all empty cells without having to write out code for all 47 columns that I have in my report : PROC REPORT DATA = STAGE1; DEFINE NAME -- REFERRAL_BASIS/ DISPLAY; COMPUTE NAME; IF NAME= '' THEN CALL DEFINE('NAME', "STYLE", "STYLE=[BACKGROUND=CYAN]"); ENDCOMP; RUN;
... View more
Hello, I am getting this error message for INPUT function, could anyone please help me with this issue? TIA. Here is my code: data lb; merge adsl(in=a) lb1(in=b); length AVALC $50. SUBJID $15.; by USUBJID; if a and b; INDEX+1; SUBJID=substr(USUBJID,13,7); AVAL=LBSTRESN; AVALC=LBSTRESC; if LBCAT='COAGULATION' and LBTESTCD in ('APTT' 'INR' 'PT') or LBCAT='URINALYSIS' and LBTESTCD in ('URBILV' 'URGLUV' 'URPHV' 'URPROTV' 'URSGV'); run; proc sort data=lb1(where=(index(TRT01A,'Placebo')>0 and LBDTC^='')) out=lb_1(where=(input(LBDTC,e8601dt16.)<=TRTSDTM)); by INDEX; run; I'm getting ERROR: INPUT function reported 'ERROR: Invalid date value' while processing WHERE clause. LBDTC is character 2023-11-07T12:50
... View more
Hello, I am getting the following error messages when trying to merge two datasets. One of the datasets I am getting from a csv file, so maybe the issue could be there? I was trying to specify the length of the PID variable for the redcap_sort dataset from the redcap one, which is the one we got from the csv file. However, I keep getting messages that the variable has multiple lengths and it keeps truncating the data. Any PID after 999 gets shortened. So 1000 and 1001 become 100, 1010 becomes 101, etc. Any help or a nudge in the right direction would be greatly appreciated, thank you so much. Edit: The programming with the csv file already has: data work.redcap; %let _EFIERR_ = 0;
infile &csv_file delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=1 ;
informat pid $500. ;
informat pid_ini $500. ; and the code for format: format pid $500. ; It has this for all the variables. I thought the above code would make it so that the variables would have that limit of 500 characters?
... View more
When I subset a dataset in a DATA step, SAS will continue to run for much longer than expected, so long in fact that I have not seen it finish running. However, when I break the run and cancel the submitted statements, the log indicates that 1,271 observations were read, which is number of observations that I expect to have in the subset. Why is it that SAS keeps running when all of the observations that match the WHERE condition have been read? In the DATA step I use a WHERE statement to subset for observations where the character variable SUB = '123'. The dataset is large (1.3M+ obs.), but as I mentioned, the resulting data set "filtered_items" should only have 1,271 observations. libname corpxin "\\filepath\folder";
data filtered_items;
set corpxin.items_202001;
where SUB = '123';
run;
... View more