As a programmer, it is ideal if you are aware of as many automatic global macro variables as possible. It is quite a task to remember all of them. However, there are quite a few that come in handy often. Using the automatic global variable the SYSDAY, we will try and produce two types of reports for a sales manager. If it's midweek, we will produce a detailed report. For the end of the week, our aim will be to produce a weekly summary.
We will produce a new Sales dataset with the date, product name, and the sales (in thousands). To try and replicate the output in the following pages, change the day condition as the following code will only produce an output if the day of the macro run is Wednesday or Friday:
Data Sales;
Input SaleDate Date9. Product $ Sales;
Format SaleDate Date9.;
Datalines;
01Aug2019 Med1 56
02Aug2019 Med2 45...