Exercises

1. Create a folder named problems in your SAS studio account;
2. Assign a library reference (of your choice) to this folder;
3. Copy the files with the extension .dat in the folder problems.
4. Create a file reference to each data file in the folder


The file diabetes.dat contains the following fields:

a. ID, character, length 4;
b. SEX, character, column 6
c. Age, numeric, columns 8-9
d. Height, numeric, columns 11-12
e. Weight, numeric, columns 14-16
f. Pulse, numeric, columns 18-20
g. Glucose1, numeric, columns 22-24
h. Glucose2, numeric, columns 26-28.


1. Read the contents of the file in a temporary SAS dataset with the name diabet.
2. Read the contents of the file in a permanent SAS dataset with the name diabetP.
3. Display the structure and contents of the file.
4. By reading from diabetes.dat, create a SAS dataset named diabetesF sub-setting observation of female subjects.
5. By reading from diabetes.dat, create a SAS dataset named diabetesM sub-setting observation of male subjects.
6. Create a new SAS dataset from diabetes.dat; add a new variable Df that stores the difference between Glucose1 and Glucose2.
7. Display variables  ID, Height si Df.
8. Create a new dataset containing all observations of subjects with age smaller than 70 years.
9. Create a new dataset with a new variable storing the current date.
10. Create a new dataset in which copy only observations 3,5 and 8 from diabetes.dat.