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.
Hi there, was hoping for some guidance on this. I'm a student, I'm taking a class on SAS this semester and I have access to SAS OnDemand for Academics. My problem is, I have a long road trip coming up, which will involve many hours in the car away from all internet connection. Mobile hotspot is not an option for me, as it's not part of my data plan. I'm going to need to do homework during this time. Is there a way that I can access the software offline? Would I be able to download it and just have my datasets kept on my computer, so I wouldn't need the cloud storage? Or does this version of SAS have an offline browser mode I might be able to use?
... View more
Boa tarde, tenho duas tabelas e gostaria de gerar/exportar um arquivo único, em que, cada tabela ficasse em uma aba do excel. Como fazer este procedimento?
... View more
proc sql; create table laps_full as select A.*, B.ref_desc from laps As A left join reason_ref as B on (B.ref_code = A.rsn_cd and A.src_app_cd = B.src_type_code) ; quit; can someone please help me understand why I get the error. I checked the view with alias B and all the columns are present in that view.
... View more
Hi,
I have this table:
DATA HAVE;
INPUT CATEGORY TYPE$ INV_M1 INV_M2 INV_M3 ;
CARDS;
1 A 5 5 9
1 B 10 2 2
2 A 2 2 3
2 B 6 6 5
3 A 8 7 9
3 B 4 9 8
4 A 10 8 9
4 B 5 2 1
;
RUN;
For each CATEGORY and for each month (M1,M2,M3), I have to calculate the following result (TYPE B / TYPE A)
The result should be this:
What function can I use ?
... View more
Hi guys,
suppose to have the following:
data DB;
input ID :$20. Admission :date09. Discharge :date09. Index1 Index2;
format Admission date9. Discharge date9.;
cards;
0001 13JAN2017 25JAN2017 1 1
0001 22FEB2018 03MAR2018 0 1
0001 30JAN2019 04MAR2019 0 1
0002 01DEC2018 14DEC2018 1 1
0002 25DEC2018 02JAN2019 0 1
0003 09JAN2016 25JAN2016 1 1
0003 29JAN2018 12FEB2018 0 1
0004 02FEB2014 12MAR2014 1 0
0004 02DEC2018 11SEP2019 0 1
;run;
Is there a way to get the following?
data DB1;
input ID :$20. Admission :date09. Discharge :date09. Index1 Index2;
format Admission date9. Discharge date9.;
cards;
0001 13JAN2017 25JAN2017 1 1
0001 22FEB2018 03MAR2018 0 0
0001 30JAN2019 04MAR2019 0 0
0002 01DEC2018 14DEC2018 1 1
0002 25DEC2018 02JAN2019 0 0
0003 09JAN2016 25JAN2016 1 1
0003 29JAN2018 12FEB2018 0 0
0004 02FEB2014 12MAR2014 1 0
0004 02DEC2018 11SEP2019 0 1
;run;
In other words the column Index2 should be updated to have "1" only if "1" is present in column Index1 at the same row otherwise 0. This only if for each ID there is more than "1" in variable Index2 (i.e., "1" is repeated). For example, nothing should happen for ID 0004.
Thank you in advance
... View more