Run these in interactive mode in this order:
- begin.sas - start CAS session, simulate data, review data in CAS
- tip_1.sas
- ...
- tip_13.sas
- end.sas - end and clear CAS session
| /* setup a cas session */ | |
| cas mysess sessopts=(caslib='casuser'); | |
| libname mycas cas sessref=mysess; | |
| /* how many positive intergers to check for FizzBuzz? */ | |
| %let l=1000000; /* size of sequence, per thread */ | |
| /* single thread version */ | |
| data mycas.FizzBuzz / single=yes; | |
| do until(i=&l.); |
Run these in interactive mode in this order:
This code snippet uses a SAS datastep to convert a string of values into a column with multiple rows containing the individual values. See the examples below before going down to the code snippet.
data example;
infile datalines dsd;
informat Cat_1 $1. LIST_VAR $40.;
input Cat_1 LIST_VAR;This code snippet uses a SAS datastep to convert a column of values into a delimitted list in a string. This code also works when you have 'by group' where you want a separate list for each level of a column or combination of columns. See the examples below before going down to the code snippet.
data example;
input Cat_1 $ Cat_2 $ String $;
datalines;
A A APPLE