A regional Marketing manager feels that his company has cornered $40$% of the typewriter market in a specific area. Taking $p = .4$ as the null hypothesis, the manager decides to consider this claim reasonable unless a sample of $19$ sales shows $X$ $\leq$ $3$ or $X$ $\geq$ $12$, where X denotes the number of typewriters sold by his company.
(a) Find $\alpha$ for this test.
(b) Find the power of the test for several values of p between $.1$ and $.9$ and plot the power curve.
Attempted Solution:
(a) $\alpha = \Pr(\text{rejection of $H_0$ when $H_0$ is true})$
$\Pr(X \leq 3) + \Pr(X \geq 12) = 0.058$
(b) When the p values are $.1, .2, .3, .4, .5, .6, .7, .8, .9$, I get that the probabilities of being in the rejection region are $.885, .455, .136, .058, .182, .488, .818, .977$, and $.999$, respectively. This produces the graph below.
I was hoping to see if I did this correctly, and if anyone knows how to graph this in SAS.

Checking:
(a) Under $H_0: p = .4,$ the test statistic $X \sim \mathsf{Binom}(n = 19, p=.4).$ The rejection region in terms of $X$ is $\{X \le 3\} \cup \{X \ge 12\}.$
$\alpha = P(\text{Rej}\mid H_0) = P(\text{Rej}\mid p=.4) = P(X\le 3) + P(X \ge 12) = 0.058 ,$ as found using R statistical software. So this part is OK.
(b) According to your page of work, you seem to be using $\gamma(p)$ for the power, that is $\gamma(p) = P(\text{Rej}\mid p).$ You wish to plot $\gamma(p)$ against $p$ for various values of $p$ with $.1 \le p \le .9.$ First, I will use R to make a table for values $p = .1, .2, \dots, .9,$ in order to verify the answers you got.
Except for rounding, these values seem to agree with yours.
In order to make a smooth power curve, I will pick more values of $p$ closer together.
The vertical green line at the hypothetical value $p = 0.4$ crosses the curve at the significance level $\alpha.$ Strictly speaking this one point is not a power value. It is appropriate to label the vertical axis as 'P(Rej)'.
It is possible that SAS has a procedure for binomial tests and that there is an option in that procedure to make a power curve. Otherwise, you will have to do something in SAS similar to what I did in R. R makes heavy use of vector objects, so that one statement will generate all of the power values. In SAS, you may have to write a loop to go through the values of $p$ one at a time. Also, it is possible that your release of SAS will link to R and you can use essentially the same R code I did.