Recently in the SAS Community Library: SAS' @BethEbersole reveals 4 steps to stop money laundering, solve law-enforcement cases, find missing children and more with SAS Visual Investigator.
data _null_; string = 'antioxidant'; length unique $200 position_list $200; do i = 1 to length(string); letter = substr(string, i, 1); count = countc(string, letter); if count = 1 then do; unique = cats(unique, letter); position_list = cats(position_list, i); end; end; put unique; put position_list; run;
I want output position of non repeated letters like below
Non-Repeated_Letters
O
X
D
antioxidant
5
6
8
... View more
I'm kind of confused about what a library is. I think it's just a folder that contains folders and files, but this is not clear to me. If a library doesn't have any files (but rather has files in subfolders), will files not be accessible? Would we/can therefore add another libref to a subfolder to access those files within subfolders?
... View more
Hello all, I am very new to SAS. I can interpret a few things in SAS but when it comes to writing a code I am completely lost. data dormant_pca_cc; set dev.fcs_jun19_dorm_pca_cc_build; Above is my dataset info. Attached is the file containing the final variables(along with variable description) which should be considered for calculating obligator level score/ PD. The dependent variable is: FCS_bad_9m_Jun19 Can anyone help me writing a code to calculate obligator level PD in SAS? Many thanks, A
... View more
Hi SAS Coders:
I am trying to change numeric observations into character so I can do my analysis, but it is showing blank observations for these variables:
Obs
fast
purge
language
age_group
sex_category
ethnicity
USBorn
slimfast
DescribeWt
HomeEnv
1
.
.
E
<11
Male
NonH
Life
No
VeryOver
PrettyT
2
.
.
E
<11
Male
NonH
Life
No
SlghtOve
VeryTru
3
.
.
E
<11
Male
Hisp
Miss
Mis
Right
Missing
4
.
.
E
<11
Female
NonH
Life
No
Right
VeryTru
5
.
.
E
<11
Male
Hisp
Life
No
SltUnder
PrettyT
6
.
.
E
<11
Female
Hisp
Life
No
Right
VeryTru
7
.
.
E
<11
Female
NonH
Life
No
Right
PrettyT
8
.
.
E
<11
Female
NonH
Life
No
SlghtOve
PrettyT
9
.
.
E
<11
Female
NonH
Life
No
SltUnder
VeryTru
10
.
.
E
<11
Female
NonH
Life
No
Right
VeryTru
I know the observations are in fact numeric as it says "1" and "2" in the dataset
My code is this:
DATA WORK.CLEANDATA;
SET YRRSIMPT.import;
/* Categorize age */
IF age < 11 THEN age_group = "<11";
ELSE IF age = 12 THEN age_group = "12";
ELSE IF age = 13 THEN age_group = "13";
ELSE IF age = 14 THEN age_group = "14";
ELSE IF age >= 15 THEN age_group = "14+";
ELSE age_group = "Missing";
/* Categorize sex */
IF sex = 1 THEN sex_category = "Female";
ELSE IF sex = 2 THEN sex_category = "Male";
ELSE sex_category = "Missing";
IF v4 = 1 THEN ethnicity = "Hisp";
ELSE IF v4 = 2 THEN ethnicity = "NonHisp";
ELSE ethnicity = "Missing";
/* Categorize v66 (USBorn) */
IF v66 = 1 THEN USBorn = "<1Yr";
ELSE IF v66 = 2 THEN USBorn = "1-3Yrs";
ELSE IF v66 = 3 THEN USBorn = "4-6Yrs";
ELSE IF v66 = 4 THEN USBorn = "6+Yr";
ELSE IF v66 = 5 THEN USBorn = "Life";
ELSE USBorn = "Missing";
/* Categorize v51 */
IF v51 = 1 THEN fast = "Yes";
ELSE IF v51 = 2 THEN fast = "No";
ELSE fast = "Missing";
/* Categorize v52 */
IF v52 = 1 THEN purge = "Yes";
ELSE IF v52 = 2 THEN purge = "No";
ELSE purge = "Missing";
/* Categorize v53 */
IF v53 = 1 THEN slimfast = "Yes";
ELSE IF v53 = 2 THEN slimfast = "No";
ELSE slimfast = "Missing";
IF v49 = 1 THEN DescribeWt = "VUnderWt";
ELSE IF v49 = 2 THEN DescribeWt = "SltUnder";
ELSE IF v49 = 3 THEN DescribeWt = "Right";
ELSE IF v49 = 4 THEN DescribeWt = "SlghtOver";
ELSE IF v49 = 5 THEN DescribeWt = "VeryOver";
ELSE DescribeWt = "Missing";
/* Categorize v71 (HomeEnv) */
IF v71 = 1 THEN HomeEnv = "NotTrue";
ELSE IF v71 = 2 THEN HomeEnv = "LilTrue";
ELSE IF v71 = 3 THEN HomeEnv = "PrettyTrue";
ELSE IF v71 = 4 THEN HomeEnv = "VeryTrue";
ELSE HomeEnv = "Missing";
KEEP age_group ethnicity sex_category HomeEnv purge fast USBorn DescribeWt language slimfast;
RUN;
... View more
A new update is available for SAS Infrastructure for Risk Management , version 3.7 : Hot Fix: M2Q002 - Published 08MAY2024 , Download link for M2Q002 Component name: SAS Infrastructure for Risk Management Related SAS release: 9.4 Issues addressed in M2Q002 SAS Note 70538 SAS® Infrastructure for Risk Management tables are not updated to reflect configurable inputs SAS Note 70539 An error occurs when deleting instances from the SAS® Infrastructure for Risk Management User Interface SAS Note 70540 The SAS® Infrastructure for Risk Management Live ETL process fails with the error “java.lang.NullPointerException” SAS Note 70541 SAS® Infrastructure for Risk Management instances that are created from personal federated areas have slower performance SAS Note 70610 An HTTP 403 error occurs when running SAS® Infrastructure for Risk Management instances in parallel SAS Note 70612 SAS® Infrastructure for Risk Management batch performance improvements SAS Note 70640 SAS® Infrastructure for Risk Management enables the use of PooledConnectionProvider This list of notes might be incomplete. For a complete list of issues addressed by this hot fix, visit the hot fix page for M2Q002 Note: A comprehensive list of all SAS hot fixes is available from support.sas.com. You can use the SAS Hot Fix Analysis, Download, and Deployment (SASHFADD) tool to manage your SAS hot fixes.
... View more