Define seven events. The seven DEFINE statements create the events named basic, doc, system_title, header, data, country,and frequency.


   define event basic;
   end;

   define event doc;
   start:
      put '' nl nl;
      put '' nl;
      put '' nl;
      put '' nl;
      ndent;
   finish:
      xdent;
      put nl;
      put '';
   end;

   define event system_title;
      put '';
      put VALUE;
      put '';
      put nl nl;
   end;
define event header;
   start:
   trigger country /if cmp(LABEL, 'EmpCountry');
   end;

   define event data;
   start:
   trigger frequency /if cmp(name, 'Frequency');
   end;

   define event country;
      put '' nl ;
      ndent ;
      put '' ;
      put VALUE ;
      put '' nl  ;
   end;

   define event frequency;
      put '' ;
      put VALUE ;
      put '' nl  ;
      xdent ;
      put '' nl ;
   end;

   output_type = 'xml';
   default_event = 'basic';
   indent = 2;
   split = '';
   nobreakspace = ' ';
   mapsub = '/</>/&/';
   map = '<>&';
   stacked_columns=off;
   end;
run;