The Forecast Command Builder is a SAS/AF application shipped with the Time Series Forecasting System in versions 7.01 and later. It lets you build a list of FORECAST commands through a point-and-click interface, run them in a batch, and, optionally, save them to retrieve and edit or rerun at a later time. An enhanced version is available in release 8.2 of the SAS System.
Bring up the command builder using the command
AF C=SASHELP.FORCAST.FORCCMD.FRAME
The command builder is also intended to serve as a demo application for developing custom forecasting interfaces using SAS/AF software. You can copy the source code (FORCCMD.SCL) and modify it or use it as a model for your own application.

Forecast command builder window
Using the Forecast Command Builder
You can use the command builder to construct any set of arguments to the Forecast command. The window saves typing and presents you with available sets of values, but it does not attempt to ensure that the command you construct will run successfully.
The most common use of the window is to set up batches of unattended forecasting runs, either to fit models and create first-time forecasts or to update forecasts using existing projects and updated data.
Begin by filling in the fields on the Basic tab. Once a time series data set has been selected, you can click the series arrow for a pop-up list of series names.
To load an existing project, select it using the project browse button or type in its name. To create a new project, specify a new project name or omit it to use the default project name.
As you make selections, a command is built and displayed in the Current Command box. To execute this command, click the Run Current button. After execution, the command builder window remains open.
To build a list of commands, click the Add Current button. The current command is added to the list in the Command List tab. The window fields remain populated to facilitate construction of a long list of commands containing related information. For example, if you are forecasting more than one series from the same data set, click Add Current each time you select a series to add a separate command to the list for each series being forecast. Continue making changes and clicking the Add Current button until all the commands you want included in your batch run appear in the list.
It is a good idea to save your list of commands for later use or for editing in case you don't get the desired result the first time. Simply click the Save List button on the Command List tab. Your commands are saved to sasuser.fmsproj._cmdlst_.slist. The most recently saved list is loaded back in from this same catalog entry when you click the Load List button.
To edit the list of commands, select a command in the Command list tab to highlight it. This command then populates the fields on the Basic and Advanced tabs, where you make changes. Click Add Current to add a revised command to the list. Click Delete to delete an unwanted command.
To execute the commands displayed in the command list tab, click the Run List button. The amount of time needed to complete the run depends on the number of commands and the amount of data. Since each command runs independently, the number of commands you can run in a batch is practically unlimited. For large batch runs, avoid using the same project name for every command, since project files can exceed a size limit when the number of series is very large. Unless you choose an entry other than FORECAST (the default) on the Advanced tab, the commands execute without user interaction. Examine the SAS log for information about the outcome of your run.
For more detailed information and for examples, see the Forecast command documentation.
Viewing Output
After commands have finished execution, if you have used the default entry option of FORECAST on the advanced tab, the Forecast Command Builder brings up a Forecast Output selector window, as shown below. This window lists all the output data set names you specified in your commands. If errors occurred, some of these data sets may not exist. If you used the default output data set names, each name is the same as that of the series forecast.

The forecast output selector window
Select an output data set from the list to view it. If the table radio button is selected, a VIEWTABLE window comes up to display the data set as a table. If the graph radio button is selected, the data are graphed in a new resizable window, as shown below.

Plot of a selected output
Once you click the Close button in the Forecast Output window, you are returned to the Command Builder if you clicked Run Current, or the application terminates if you clicked Run List.
These frames are found in the SASHELP.FORCAST catalog, and the SCL source code can be downloaded. The Forecast Output selector is FORCCOUT.FRAME, source code FORCCOUT.SCL . The graph window is FORCCGRF.FRAME, source code FORCCGRF.SCL.
Statistics and Operations Research Home Page | Time Series Forecasting System