Recently in the SAS Community Library: Your often contains the information you need, but not sequenced in the order required for processing. @SASJedi shows you how to properly sequence data so you can compare the data in one table to the data in another, conduct merges or joins and more.
Hello
What does it mean the following error
NOTE: SAS threaded sort was used.
ERROR: ERROR: Commit: Session forced off by PMPC or gtwglobal or security violation.
ROLLBACK has been issued (Any rows processed after the last COMMIT are lost).
... View more
Hi folks, Not sure if that's the right place to ask for this, but I just identified a weird behavior of the proc sql. Let's review this piece of code: proc format;
value yn
0='No'
1='Yes'
;
run;
data ds1;
attrib pt format=$2.;
attrib question format=yn.;
pt='01'; question=0; output;
pt='02'; question=1; output;
run;
proc sql noprint;
create table test as
select pt 'Patient',
question label='Yes/no'
from ds1
;
quit; The output dataset test is as expected, in particular the variable question has format yn. and label "Yes/no" Now, let's update the code to add an union: proc format;
value yn
0='No'
1='Yes'
;
run;
data ds1;
attrib pt format=$2.;
attrib question format=yn.;
pt='01'; question=0; output;
pt='02'; question=1; output;
run;
data ds2;
attrib pt format=$2.;
attrib question format=yn.;
pt='02'; question=0; output;
pt='03'; question=1; output;
run;
proc sql noprint;
create table test as
select pt 'Patient',
question label='Yes/no' /* la label fait sauter le format */
from ds1
union corr
select pt,
question
from ds2
;
quit;
The output dataset test is NOT as expected, in particular the variable question has no format anymore, but the expected "Yes/no" label. If we remove the label modifier, the format is kept Is this behavior expected?
... View more
Hi,
Getting below error in SAS Query. Please let me know if anyone know how to resolve this issue.
ERROR: CLI cursor extended fetch error: [Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number]
Thanks,
Amit
... View more
Hello Experts,
I would like to count the weeks in the same way like the function no.semaine in Excel.
For exemple, in my code, I'm applying the sas sas function week for 01/01/2024 and I get the week 0, but I would like to have the week 1. The 01/01/2024 starts in Monday, so I would like that the weeks starts on monday and has the values from 1 to 53.
Thank you for your help.
... View more