The resulting WORK.REVENUE data set contains 3 variables. In the provided SAS program, the set statement uses a (keep=) option to keep only 3 variables from WORK.PRODUCTS, which are ProdId, Price, and Sales. The drop= data set option in the data statement specifies to drop the Sales and Returns variables from the output data set. However, Returns was not included in the keep= option, so it won't be part of WORK.REVENUE to begin with. Finally, a new variable Revenue is calculated and included in the data set. Therefore, the final data set contains the variables ProdId, Price, and Revenue.
References:
SAS documentation on keep= and drop= data set options.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit