SAS: cdf for contaminated normal (PROC IML)

#1
Denote f(x;μ,σ) and F(x;μ,σ), respectively, the p.d.f. and the c.d.f. of N(μ,σ^2). The p.d.f. and the c.d.f. of contaminated normal cN(μ,σ2,σc^2,p) (a N(μ,σ^2) contaminated in spread by a N(μ,σc^2) with probability p) are
(1-p)f(x;μ,σ)+pf(x;μ,σc) and
(1-p)F(x;μ,σ)+pF(x;μ,σc),
respectively.

Write an IML module for c.d.f., that implement the functions. How can this be done by writing a macro with the following parameters:
1. mu (i.e., the mean μ)
2. sigma (i.e., the uncontaminated standard deviation σ)
3. cont_sigma (i.e., the contaminated standard deviation σc)
4. p (i.e., the probability of contamination)
5. data=&SYSLAST (input data set that contains a variable of x values to calculate cdf's)
6. var= (to select a single variable of x values to calculate cdf's)
7. F=cdf (data set variable name containing cdf's)
8. out= (output data set, this should contain at least 2 columns, one for x values, one for respective cdf's)