%macro ProvideSurvivalMacros;
%global atriskopts bandopts censored censorstr classopts
graphopts groups insetopts legendopts ntitles stepopts tiplabel
tips titletext0 titletext1 titletext2 xoptions yoptions;
%let TitleText0 = METHOD " Survival Estimate";
%let TitleText1 = &titletext0 " for " STRATUMID;
%let TitleText2 = &titletext0 "s"; /* plural: Survival Estimates */
%let nTitles = 2;
View Two Word
*Create sample data;
data random_sentences;
infile cards truncover;
informat sentence $256.;
input sentence $256.;
This is a random sentence
This is another random sentence
Happy Birthday
My job sucks.
View sankey.csv
source target value
Barry Elvis 2
Frodo Elvis 2
Frodo Sarah 8
Barry Alice 2
Elvis Sarah 2
Elvis Alice 12
Sarah Alice 4
/*Sourced from here:
options noxwait noxsync;
%macro convert_files(default=,ext=);
data _null_;
file "'&default\temp.vbs'";
View flare-labeled.json
"name": "flare",
"description": "flare",
"children": [
"name": "analytic",
"description": "analytics",
"children": [
"name": "cluster",
*create sample data for demonstration;
data have;
infile cards dlm='09'x;
input OrgID Product $ States $;
1 football DC
1 football VA
1 football MD
2 football CA
3 football NV
/*This program demonstrates how to create a basic anonymized
key for a unique identifier. Ensure you set the value in CALL
STREAMINIT()/RANDOM_SEED macro variable to ensure you can
replicate the keys if needed*/
%let random_seed = 30;
*list of unique values;
proc sql;
create table unique_list as
proc sql noprint;
select min(period) into :min_period TRIMMED
from have;
select max(period) into :max_period TRIMMED
from have;
%put &min_period;
%put &max_period;
View sas_proc_sort_duplicate_keys
/*This example demonstrates how to get a list of duplicates based on the key variables.
KEY variables are placed in the BY statement.
Any 'duplicates' according to the KEY variables are kept in the OUT= dataset
*Generate sample data with duplicate KEY;
data class;
set sashelp.class sashelp.class(obs=5);
View sas_categorize_variable
data class;
set sashelp.class;
length category $20.;
bmi = 703*(weight/(height**2));
if bmi < 18 then
category='Under Weight';
else if 18 <= BMI < 25 then
else if 25 <= BMI < 30 then