This scenario uses the
Certadv.All data set. Write a SAS program that does the following:
-
In a PROC FCMP step, create a temporary
custom function called Adding with a numeric argument named Val. The
function itself returns the value of Final
,
which is the value of 38
added to the
value of Val. Store the function in the output library Work with the
table name of Function and the package name of Add.
-
In a global statement, add the
appropriate option so that SAS knows where to search for the custom
function.
-
In a DATA step, create the temporary
data set named Work.StudentCost by reading in the data set Certadv.All.
Create a custom function for the Fee variable to create a variable
named Final_Cost.
-
In a PROC PRINT step, create a
report based on Work.StudentCost with the following variables displayed:
Student_Name, Course_Code, Fee, and Final_Cost.