- Copy the program below and paste it into the Program Editor window (or issue the command
copy sashelp.oltutor..source ).
data finance.totals;
set finance.credit;
length Label $ 6;
if type='D' then DTotal+transaction;
else CTotal+transaction;
if type='D' then label='Debit';
else label='Credit';
run;
Modify the DATA step by combining the statements in the two sets of IF-THEN
and ELSE statements into one set of IF-THEN and ELSE statements.
-
Submit the DATA step and correct any errors, and then print the data set.
Return here and select Next.
|