Resources

Getting Started Example for PROC X12

/*--------------------------------------------------------------

                    SAS Sample Library

        Name: x12gs.sas
 Description: Example program from SAS/ETS User's Guide,
              The X12 Procedure
       Title: Getting Started Example for PROC X12
     Product: SAS/ETS Software
        Keys: seasonal adjustment of time series
        PROC: X12
       Notes:

--------------------------------------------------------------*/

data sales;
   set sashelp.air;
   sales = air;
   date = intnx( 'month', '01sep78'd, _n_-1 );
   format date monyy.;
run;


proc x12 data=sales date=date;
   var sales;
   x11;
   ods select d11;
run;

proc x12 data=sales date=date noprint;
   var sales;
   x11;
   output out=out a1 d11;
run;

proc sgplot data=out;
   series x=date y=sales_A1 / name = "A1" markers
                              markerattrs=(color=red symbol='asterisk')
                              lineattrs=(color=red);
   series x=date y=sales_D11 / name= "D11" markers
                               markerattrs=(symbol='circle')
                               lineattrs=(color=blue);
   yaxis label='Original and Seasonally Adjusted Time Series';
run;