%macro ship_to(customer);

   %global deliver method;
   %let deliver=;
   %let method=;

   %if &customer ne %then %do;
      %if %substr(&customer,1,1)=X %then
          %let deliver=expedite;
      %if %substr(&customer,2,1)=A %then
          %let method=air;
   %end;

   %mvarprt

%mend ship_to;

________________________________________________________________________

%macro mvarprt;

   %local __countn;

      /* Check to see that MSYMTABMAX=0. */
   proc sql noprint;
   select count(*) into: __countn
   from dictionary.options
   where optname='MSYMTABMAX' and setting="0";
   quit;

       /* 1 means that MSYMTABMAX=0. */
   %if &__countn=1 %then
   %do;

          /* Get names and values. */
       proc sql flow=40;
       select objname label='Macro Variable Name',
              input(substr(memname,6),2.) as mlevel
                    label='Nesting Level',
              symget(objname) as value
                    label='Macro Variable Contents'
                    format=$char.
       from dictionary.catalogs
       where libname='WORK' and memname like 'SASST%'
             and objtype='MSYMTAB'
             and objname not in ('SQLOBS' 'SQLOOPS'
                 'SQLRC' '__COUNTN')

          /* Display in this order. */
       order by objname,mlevel
       ;
       quit;

   %end;
   %else %put ERROR: MSYMTABMAX must be set to zero.;

%mend mvarprt;