<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Disallowed combinations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Disallowed-combinations/m-p/9555#M536</link>
    <description>I am trying to use the mktkey and mktroll macros to create a choice experiment.  Within this choice experiment, I need to create disallowed combinations.  The experiment has three factors, each with seven levels.  The seven levels within each factor are identical, and I need to unable them to repeat within a choice set.  Essentially, I have varying combinations of three out of the seven levels.  However, I am having trouble setting up the disallowed combinations.  Does anyone have any advice for how to code those disallowed combinations?</description>
    <pubDate>Mon, 14 Feb 2011 17:23:30 GMT</pubDate>
    <dc:creator>L</dc:creator>
    <dc:date>2011-02-14T17:23:30Z</dc:date>
    <item>
      <title>Disallowed combinations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Disallowed-combinations/m-p/9555#M536</link>
      <description>I am trying to use the mktkey and mktroll macros to create a choice experiment.  Within this choice experiment, I need to create disallowed combinations.  The experiment has three factors, each with seven levels.  The seven levels within each factor are identical, and I need to unable them to repeat within a choice set.  Essentially, I have varying combinations of three out of the seven levels.  However, I am having trouble setting up the disallowed combinations.  Does anyone have any advice for how to code those disallowed combinations?</description>
      <pubDate>Mon, 14 Feb 2011 17:23:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Disallowed-combinations/m-p/9555#M536</guid>
      <dc:creator>L</dc:creator>
      <dc:date>2011-02-14T17:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Disallowed combinations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Disallowed-combinations/m-p/9556#M537</link>
      <description>I don't believe those are macros that are shipped with SAS.  Can you post the code for these macros?  We would then be able to help you out more easily.</description>
      <pubDate>Mon, 14 Feb 2011 17:29:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Disallowed-combinations/m-p/9556#M537</guid>
      <dc:creator>RickM</dc:creator>
      <dc:date>2011-02-14T17:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Disallowed combinations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Disallowed-combinations/m-p/9557#M538</link>
      <description>Though I don't know the answer to L's question, the macros are described in&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/techsup/technote/mr2010.pdf" target="_blank"&gt;http://support.sas.com/techsup/technote/mr2010.pdf&lt;/A&gt;</description>
      <pubDate>Mon, 14 Feb 2011 17:56:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Disallowed-combinations/m-p/9557#M538</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2011-02-14T17:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Disallowed combinations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Disallowed-combinations/m-p/9558#M539</link>
      <description>&lt;B&gt;Mktkey macro:&lt;/B&gt;&lt;BR /&gt;
/****************************************************************/&lt;BR /&gt;
 /*          S A S   A U T O C A L L   L I B R A R Y             */&lt;BR /&gt;
 /*                                                              */&lt;BR /&gt;
 /*    NAME: MktKey                                              */&lt;BR /&gt;
 /*   TITLE: Create Variables Lists for MktRoll                  */&lt;BR /&gt;
 /* PRODUCT: STAT                                                */&lt;BR /&gt;
 /*  SYSTEM: ALL                                                 */&lt;BR /&gt;
 /*    KEYS: marketing research, designs                         */&lt;BR /&gt;
 /*   PROCS:                                                     */&lt;BR /&gt;
 /*    DATA:                                                     */&lt;BR /&gt;
 /* SUPPORT: saswfk                      UPDATE:  25Jul2010      */&lt;BR /&gt;
 /*     REF: See "Marketing Research Methods in SAS" at the      */&lt;BR /&gt;
 /*          following URL for more information on this macro.   */&lt;BR /&gt;
 /*                                                              */&lt;BR /&gt;
 /* &lt;A href="http://support.sas.com/techsup/tnote/tnote_stat.html#market" target="_blank"&gt;http://support.sas.com/techsup/tnote/tnote_stat.html#market&lt;/A&gt;  */&lt;BR /&gt;
 /*                                                              */&lt;BR /&gt;
 /*    MISC: The following SAS products are required to run      */&lt;BR /&gt;
 /*          this macro: BASE.                                   */&lt;BR /&gt;
 /*                                                              */&lt;BR /&gt;
 /*          This macro creates global macro variables: _MktVer  */&lt;BR /&gt;
 /****************************************************************/&lt;BR /&gt;
&lt;BR /&gt;
 /*---------------------------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
If you will be using the MktRoll macro to make a choice design from the&lt;BR /&gt;
linear design that MktEx produces, you can call MktKey macro to get all&lt;BR /&gt;
of the variable names.  For example,&lt;BR /&gt;
&lt;BR /&gt;
   %mktkey(3 5)&lt;BR /&gt;
&lt;BR /&gt;
produces a 3x5 matrix of the names x1-x15:&lt;BR /&gt;
&lt;BR /&gt;
                        x1     x2     x3     x4     x5&lt;BR /&gt;
&lt;BR /&gt;
                        x1     x2     x3     x4     x5&lt;BR /&gt;
                        x6     x7     x8     x9     x10&lt;BR /&gt;
                        x11    x12    x13    x14    x15&lt;BR /&gt;
&lt;BR /&gt;
which can be cut and pasted into a program like this to make the choice&lt;BR /&gt;
design:&lt;BR /&gt;
&lt;BR /&gt;
   data key;&lt;BR /&gt;
      input (Brand Price Size Color Shape Form) ($);&lt;BR /&gt;
      datalines;&lt;BR /&gt;
   A    x1     x2     x3     x4     x5&lt;BR /&gt;
   B    x6     x7     x8     x9     x10&lt;BR /&gt;
   C    x11    x12    x13    x14    x15&lt;BR /&gt;
   None   .    .      .      .      .&lt;BR /&gt;
   ;&lt;BR /&gt;
&lt;BR /&gt;
   %mktroll(key=key, design=randomized, out=choicedes, alt=brand)&lt;BR /&gt;
&lt;BR /&gt;
There are three forms of input the the macro:&lt;BR /&gt;
&lt;BR /&gt;
  * A number of rows followed by a number of columns, as in the example above.&lt;BR /&gt;
    The output is a data set called KEY with row * column variable names,&lt;BR /&gt;
    x1, x2, ....&lt;BR /&gt;
  * A number of rows followed by a number of columns followed by "t" or "T"&lt;BR /&gt;
    for transpose.  The output data set called KEY is as follows.&lt;BR /&gt;
    %mktkey(6 4 t)&lt;BR /&gt;
&lt;BR /&gt;
                            x1    x2     x3     x4&lt;BR /&gt;
&lt;BR /&gt;
                            x1    x7     x13    x19&lt;BR /&gt;
                            x2    x8     x14    x20&lt;BR /&gt;
                            x3    x9     x15    x21&lt;BR /&gt;
                            x4    x10    x16    x22&lt;BR /&gt;
                            x5    x11    x17    x23&lt;BR /&gt;
                            x6    x12    x18    x24&lt;BR /&gt;
&lt;BR /&gt;
    This is the transpose of the default data set with variable names&lt;BR /&gt;
    progressing down the columns rather than across the rows.&lt;BR /&gt;
&lt;BR /&gt;
  * A variable list.&lt;BR /&gt;
    %mktkey(x1-x20)&lt;BR /&gt;
    The expanded variable list is printed to the log and no data set&lt;BR /&gt;
    is created:&lt;BR /&gt;
    x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20&lt;BR /&gt;
&lt;BR /&gt;
------------------------------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
 DISCLAIMER:&lt;BR /&gt;
&lt;BR /&gt;
       THIS INFORMATION IS PROVIDED BY SAS INSTITUTE INC. AS A SERVICE&lt;BR /&gt;
 TO ITS USERS.  IT IS PROVIDED "AS IS".  THERE ARE NO WARRANTIES,&lt;BR /&gt;
 EXPRESSED OR IMPLIED, AS TO MERCHANTABILITY OR FITNESS FOR A&lt;BR /&gt;
 PARTICULAR PURPOSE REGARDING THE ACCURACY OF THE MATERIALS OR CODE&lt;BR /&gt;
 CONTAINED HEREIN.&lt;BR /&gt;
&lt;BR /&gt;
----------------------------------------------------------------------*/&lt;BR /&gt;
&lt;BR /&gt;
%macro mktkey(    /*--------------------------------------------------*/&lt;BR /&gt;
list              /* rows columns   - x1-x(rows x columns)            */&lt;BR /&gt;
                  /* rows columns t - x1-x(rowx x columns) transposed */&lt;BR /&gt;
                  /* variable list  - expands list                    */&lt;BR /&gt;
                  /* ? or help      - lists options                   */&lt;BR /&gt;
);                /*--------------------------------------------------*/&lt;BR /&gt;
&lt;BR /&gt;
;*=========================== Macro Start =============================;&lt;BR /&gt;
&lt;BR /&gt;
*------initial macro stuff------;&lt;BR /&gt;
%global _MktVer;&lt;BR /&gt;
%local  localver abort k r c b savenote setnote timeopt;&lt;BR /&gt;
&lt;BR /&gt;
%let localver = 25Jul2010;&lt;BR /&gt;
%let timeopt  = %scan(STIMER STATS, 1 + (&amp;amp;sysscp = OS));&lt;BR /&gt;
%let savenote = %sysfunc(getoption(&amp;amp;timeopt)) %sysfunc(getoption(notes));&lt;BR /&gt;
%let setnote  = nonotes no&amp;amp;timeopt;&lt;BR /&gt;
%let _mktver  = &amp;amp;localver;&lt;BR /&gt;
%let abort    = 0;&lt;BR /&gt;
&lt;BR /&gt;
options noserror;&lt;BR /&gt;
%if %nrquote(&amp;amp;&amp;amp;mktopts) ne %nrstr(&amp;amp;)mktopts %then %do;&lt;BR /&gt;
   %let k = %upcase(&amp;amp;mktopts);&lt;BR /&gt;
   %if %index(&amp;amp;k, CHECKVERSION) %then %do; options serror; %goto mendit; %end;&lt;BR /&gt;
   %if %index(&amp;amp;k, NOTES)   %then %let setnote = notes &amp;amp;timeopt;&lt;BR /&gt;
   %if %index(&amp;amp;k, VERSION) %then %put MktKey macro version &amp;amp;localver.;&lt;BR /&gt;
   %end;&lt;BR /&gt;
options serror;&lt;BR /&gt;
&lt;BR /&gt;
options &amp;amp;setnote;&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
   length list $ 32;&lt;BR /&gt;
   list = left(lowcase(symget('list')));&lt;BR /&gt;
   if list eq 'help' or list eq '?' then call symput('abort', '-1');&lt;BR /&gt;
   if _error_ then call symput('abort', '1');&lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;BR /&gt;
%if &amp;amp;syserr &amp;gt; 4 %then %let abort = 1; %if &amp;amp;abort = 1 %then %goto endit;&lt;BR /&gt;
&lt;BR /&gt;
%if &amp;amp;abort = -1 %then %do; %let abort = 0; %mkthelp(mktkey) %goto endit; %end;&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
   length str $ 200;&lt;BR /&gt;
   str = symget('list');&lt;BR /&gt;
   if str = ' ' then do;&lt;BR /&gt;
      put 'ERROR: You must specify the LIST positional parameter.';&lt;BR /&gt;
      call symput('abort', '1');&lt;BR /&gt;
      end;&lt;BR /&gt;
&lt;BR /&gt;
   r = input(scan(str, 1, ' '), ?? 23.);&lt;BR /&gt;
   if n(r) then do;&lt;BR /&gt;
      call symput('r', compress(put(r, 5.)));&lt;BR /&gt;
      c = input(scan(str, 2, ' '), ?? 23.);&lt;BR /&gt;
      if n(c) then do;&lt;BR /&gt;
         call symput('c', compress(put(c, 5.)));&lt;BR /&gt;
         if scan(str, 3, ' ') in ('t', 'T') then b = r;&lt;BR /&gt;
         else b = 1;&lt;BR /&gt;
         call symput('b', compress(put(b, 5.)));&lt;BR /&gt;
         end;&lt;BR /&gt;
      else do;&lt;BR /&gt;
         put 'ERROR: Either specify a variable list or a row and column.';&lt;BR /&gt;
         call symput('abort', '1');&lt;BR /&gt;
         end;&lt;BR /&gt;
      end;&lt;BR /&gt;
   if _error_ then call symput('abort', '1');&lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;BR /&gt;
%if &amp;amp;syserr &amp;gt; 4 %then %let abort = 1; %if &amp;amp;abort %then %goto endit;&lt;BR /&gt;
&lt;BR /&gt;
%if %nrbquote(&amp;amp;r) ne %then %do;&lt;BR /&gt;
&lt;BR /&gt;
   data key(keep=x1-x&amp;amp;c);&lt;BR /&gt;
      array x&lt;LI&gt; $ x1-x&amp;amp;c;&lt;BR /&gt;
      do b = 1 to &amp;amp;b;&lt;BR /&gt;
         do i = b to %eval(&amp;amp;r * &amp;amp;c) by &amp;amp;b;&lt;BR /&gt;
            k + 1;&lt;BR /&gt;
            x&lt;K&gt; = compress('x' || put(i, 5.));&lt;BR /&gt;
            if k = &amp;amp;c then do; output; k = 0; end;&lt;BR /&gt;
            end;&lt;BR /&gt;
         end;&lt;BR /&gt;
      if _error_ then call symput('abort', '1');&lt;BR /&gt;
      run;&lt;BR /&gt;
&lt;BR /&gt;
   %if &amp;amp;syserr &amp;gt; 4 %then %let abort = 1; %if &amp;amp;abort %then %goto endit;&lt;BR /&gt;
&lt;BR /&gt;
   proc print noobs; run;&lt;BR /&gt;
&lt;BR /&gt;
   %if &amp;amp;syserr &amp;gt; 4 %then %let abort = 1; %if &amp;amp;abort %then %goto endit;&lt;BR /&gt;
   %end;&lt;BR /&gt;
&lt;BR /&gt;
%else %do;&lt;BR /&gt;
&lt;BR /&gt;
   data _null_;&lt;BR /&gt;
      length __name $ 32;&lt;BR /&gt;
      array __x&lt;/K&gt;&lt;/LI&gt;&lt;LI&gt; &amp;amp;list;&lt;BR /&gt;
      do __i = 1 to dim(__x);&lt;BR /&gt;
         call vname(__x[__i], __name);&lt;BR /&gt;
         put __name @@;&lt;BR /&gt;
         end;&lt;BR /&gt;
      if _error_ then call symput('abort', '1');&lt;BR /&gt;
      run;&lt;BR /&gt;
&lt;BR /&gt;
   %if &amp;amp;syserr &amp;gt; 4 %then %let abort = 1; %if &amp;amp;abort %then %goto endit;&lt;BR /&gt;
   %end;&lt;BR /&gt;
&lt;BR /&gt;
%endit: options &amp;amp;savenote;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
%if &amp;amp;abort %then %put ERROR: The MKTKEY macro ended abnormally.;&lt;BR /&gt;
&lt;BR /&gt;
%mendit: %mend;&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Mktroll macro:&lt;/B&gt;&lt;BR /&gt;
/****************************************************************/&lt;BR /&gt;
 /*          S A S   A U T O C A L L   L I B R A R Y             */&lt;BR /&gt;
 /*                                                              */&lt;BR /&gt;
 /*    NAME: MktKey                                              */&lt;BR /&gt;
 /*   TITLE: Create Variables Lists for MktRoll                  */&lt;BR /&gt;
 /* PRODUCT: STAT                                                */&lt;BR /&gt;
 /*  SYSTEM: ALL                                                 */&lt;BR /&gt;
 /*    KEYS: marketing research, designs                         */&lt;BR /&gt;
 /*   PROCS:                                                     */&lt;BR /&gt;
 /*    DATA:                                                     */&lt;BR /&gt;
 /* SUPPORT: saswfk                      UPDATE:  25Jul2010      */&lt;BR /&gt;
 /*     REF: See "Marketing Research Methods in SAS" at the      */&lt;BR /&gt;
 /*          following URL for more information on this macro.   */&lt;BR /&gt;
 /*                                                              */&lt;BR /&gt;
 /* &lt;A href="http://support.sas.com/techsup/tnote/tnote_stat.html#market" target="_blank"&gt;http://support.sas.com/techsup/tnote/tnote_stat.html#market&lt;/A&gt;  */&lt;BR /&gt;
 /*                                                              */&lt;BR /&gt;
 /*    MISC: The following SAS products are required to run      */&lt;BR /&gt;
 /*          this macro: BASE.                                   */&lt;BR /&gt;
 /*                                                              */&lt;BR /&gt;
 /*          This macro creates global macro variables: _MktVer  */&lt;BR /&gt;
 /****************************************************************/&lt;BR /&gt;
&lt;BR /&gt;
 /*---------------------------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
If you will be using the MktRoll macro to make a choice design from the&lt;BR /&gt;
linear design that MktEx produces, you can call MktKey macro to get all&lt;BR /&gt;
of the variable names.  For example,&lt;BR /&gt;
&lt;BR /&gt;
   %mktkey(3 5)&lt;BR /&gt;
&lt;BR /&gt;
produces a 3x5 matrix of the names x1-x15:&lt;BR /&gt;
&lt;BR /&gt;
                        x1     x2     x3     x4     x5&lt;BR /&gt;
&lt;BR /&gt;
                        x1     x2     x3     x4     x5&lt;BR /&gt;
                        x6     x7     x8     x9     x10&lt;BR /&gt;
                        x11    x12    x13    x14    x15&lt;BR /&gt;
&lt;BR /&gt;
which can be cut and pasted into a program like this to make the choice&lt;BR /&gt;
design:&lt;BR /&gt;
&lt;BR /&gt;
   data key;&lt;BR /&gt;
      input (Brand Price Size Color Shape Form) ($);&lt;BR /&gt;
      datalines;&lt;BR /&gt;
   A    x1     x2     x3     x4     x5&lt;BR /&gt;
   B    x6     x7     x8     x9     x10&lt;BR /&gt;
   C    x11    x12    x13    x14    x15&lt;BR /&gt;
   None   .    .      .      .      .&lt;BR /&gt;
   ;&lt;BR /&gt;
&lt;BR /&gt;
   %mktroll(key=key, design=randomized, out=choicedes, alt=brand)&lt;BR /&gt;
&lt;BR /&gt;
There are three forms of input the the macro:&lt;BR /&gt;
&lt;BR /&gt;
  * A number of rows followed by a number of columns, as in the example above.&lt;BR /&gt;
    The output is a data set called KEY with row * column variable names,&lt;BR /&gt;
    x1, x2, ....&lt;BR /&gt;
  * A number of rows followed by a number of columns followed by "t" or "T"&lt;BR /&gt;
    for transpose.  The output data set called KEY is as follows.&lt;BR /&gt;
    %mktkey(6 4 t)&lt;BR /&gt;
&lt;BR /&gt;
                            x1    x2     x3     x4&lt;BR /&gt;
&lt;BR /&gt;
                            x1    x7     x13    x19&lt;BR /&gt;
                            x2    x8     x14    x20&lt;BR /&gt;
                            x3    x9     x15    x21&lt;BR /&gt;
                            x4    x10    x16    x22&lt;BR /&gt;
                            x5    x11    x17    x23&lt;BR /&gt;
                            x6    x12    x18    x24&lt;BR /&gt;
&lt;BR /&gt;
    This is the transpose of the default data set with variable names&lt;BR /&gt;
    progressing down the columns rather than across the rows.&lt;BR /&gt;
&lt;BR /&gt;
  * A variable list.&lt;BR /&gt;
    %mktkey(x1-x20)&lt;BR /&gt;
    The expanded variable list is printed to the log and no data set&lt;BR /&gt;
    is created:&lt;BR /&gt;
    x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20&lt;BR /&gt;
&lt;BR /&gt;
------------------------------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
 DISCLAIMER:&lt;BR /&gt;
&lt;BR /&gt;
       THIS INFORMATION IS PROVIDED BY SAS INSTITUTE INC. AS A SERVICE&lt;BR /&gt;
 TO ITS USERS.  IT IS PROVIDED "AS IS".  THERE ARE NO WARRANTIES,&lt;BR /&gt;
 EXPRESSED OR IMPLIED, AS TO MERCHANTABILITY OR FITNESS FOR A&lt;BR /&gt;
 PARTICULAR PURPOSE REGARDING THE ACCURACY OF THE MATERIALS OR CODE&lt;BR /&gt;
 CONTAINED HEREIN.&lt;BR /&gt;
&lt;BR /&gt;
----------------------------------------------------------------------*/&lt;BR /&gt;
&lt;BR /&gt;
%macro mktkey(    /*--------------------------------------------------*/&lt;BR /&gt;
list              /* rows columns   - x1-x(rows x columns)            */&lt;BR /&gt;
                  /* rows columns t - x1-x(rowx x columns) transposed */&lt;BR /&gt;
                  /* variable list  - expands list                    */&lt;BR /&gt;
                  /* ? or help      - lists options                   */&lt;BR /&gt;
);                /*--------------------------------------------------*/&lt;BR /&gt;
&lt;BR /&gt;
;*=========================== Macro Start =============================;&lt;BR /&gt;
&lt;BR /&gt;
*------initial macro stuff------;&lt;BR /&gt;
%global _MktVer;&lt;BR /&gt;
%local  localver abort k r c b savenote setnote timeopt;&lt;BR /&gt;
&lt;BR /&gt;
%let localver = 25Jul2010;&lt;BR /&gt;
%let timeopt  = %scan(STIMER STATS, 1 + (&amp;amp;sysscp = OS));&lt;BR /&gt;
%let savenote = %sysfunc(getoption(&amp;amp;timeopt)) %sysfunc(getoption(notes));&lt;BR /&gt;
%let setnote  = nonotes no&amp;amp;timeopt;&lt;BR /&gt;
%let _mktver  = &amp;amp;localver;&lt;BR /&gt;
%let abort    = 0;&lt;BR /&gt;
&lt;BR /&gt;
options noserror;&lt;BR /&gt;
%if %nrquote(&amp;amp;&amp;amp;mktopts) ne %nrstr(&amp;amp;)mktopts %then %do;&lt;BR /&gt;
   %let k = %upcase(&amp;amp;mktopts);&lt;BR /&gt;
   %if %index(&amp;amp;k, CHECKVERSION) %then %do; options serror; %goto mendit; %end;&lt;BR /&gt;
   %if %index(&amp;amp;k, NOTES)   %then %let setnote = notes &amp;amp;timeopt;&lt;BR /&gt;
   %if %index(&amp;amp;k, VERSION) %then %put MktKey macro version &amp;amp;localver.;&lt;BR /&gt;
   %end;&lt;BR /&gt;
options serror;&lt;BR /&gt;
&lt;BR /&gt;
options &amp;amp;setnote;&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
   length list $ 32;&lt;BR /&gt;
   list = left(lowcase(symget('list')));&lt;BR /&gt;
   if list eq 'help' or list eq '?' then call symput('abort', '-1');&lt;BR /&gt;
   if _error_ then call symput('abort', '1');&lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;BR /&gt;
%if &amp;amp;syserr &amp;gt; 4 %then %let abort = 1; %if &amp;amp;abort = 1 %then %goto endit;&lt;BR /&gt;
&lt;BR /&gt;
%if &amp;amp;abort = -1 %then %do; %let abort = 0; %mkthelp(mktkey) %goto endit; %end;&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
   length str $ 200;&lt;BR /&gt;
   str = symget('list');&lt;BR /&gt;
   if str = ' ' then do;&lt;BR /&gt;
      put 'ERROR: You must specify the LIST positional parameter.';&lt;BR /&gt;
      call symput('abort', '1');&lt;BR /&gt;
      end;&lt;BR /&gt;
&lt;BR /&gt;
   r = input(scan(str, 1, ' '), ?? 23.);&lt;BR /&gt;
   if n(r) then do;&lt;BR /&gt;
      call symput('r', compress(put(r, 5.)));&lt;BR /&gt;
      c = input(scan(str, 2, ' '), ?? 23.);&lt;BR /&gt;
      if n(c) then do;&lt;BR /&gt;
         call symput('c', compress(put(c, 5.)));&lt;BR /&gt;
         if scan(str, 3, ' ') in ('t', 'T') then b = r;&lt;BR /&gt;
         else b = 1;&lt;BR /&gt;
         call symput('b', compress(put(b, 5.)));&lt;BR /&gt;
         end;&lt;BR /&gt;
      else do;&lt;BR /&gt;
         put 'ERROR: Either specify a variable list or a row and column.';&lt;BR /&gt;
         call symput('abort', '1');&lt;BR /&gt;
         end;&lt;BR /&gt;
      end;&lt;BR /&gt;
   if _error_ then call symput('abort', '1');&lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;BR /&gt;
%if &amp;amp;syserr &amp;gt; 4 %then %let abort = 1; %if &amp;amp;abort %then %goto endit;&lt;BR /&gt;
&lt;BR /&gt;
%if %nrbquote(&amp;amp;r) ne %then %do;&lt;BR /&gt;
&lt;BR /&gt;
   data key(keep=x1-x&amp;amp;c);&lt;BR /&gt;
      array x&lt;/LI&gt;&lt;LI&gt; $ x1-x&amp;amp;c;&lt;BR /&gt;
      do b = 1 to &amp;amp;b;&lt;BR /&gt;
         do i = b to %eval(&amp;amp;r * &amp;amp;c) by &amp;amp;b;&lt;BR /&gt;
            k + 1;&lt;BR /&gt;
            x&lt;K&gt; = compress('x' || put(i, 5.));&lt;BR /&gt;
            if k = &amp;amp;c then do; output; k = 0; end;&lt;BR /&gt;
            end;&lt;BR /&gt;
         end;&lt;BR /&gt;
      if _error_ then call symput('abort', '1');&lt;BR /&gt;
      run;&lt;BR /&gt;
&lt;BR /&gt;
   %if &amp;amp;syserr &amp;gt; 4 %then %let abort = 1; %if &amp;amp;abort %then %goto endit;&lt;BR /&gt;
&lt;BR /&gt;
   proc print noobs; run;&lt;BR /&gt;
&lt;BR /&gt;
   %if &amp;amp;syserr &amp;gt; 4 %then %let abort = 1; %if &amp;amp;abort %then %goto endit;&lt;BR /&gt;
   %end;&lt;BR /&gt;
&lt;BR /&gt;
%else %do;&lt;BR /&gt;
&lt;BR /&gt;
   data _null_;&lt;BR /&gt;
      length __name $ 32;&lt;BR /&gt;
      array __x&lt;/K&gt;&lt;/LI&gt;&lt;LI&gt; &amp;amp;list;&lt;BR /&gt;
      do __i = 1 to dim(__x);&lt;BR /&gt;
         call vname(__x[__i], __name);&lt;BR /&gt;
         put __name @@;&lt;BR /&gt;
         end;&lt;BR /&gt;
      if _error_ then call symput('abort', '1');&lt;BR /&gt;
      run;&lt;BR /&gt;
&lt;BR /&gt;
   %if &amp;amp;syserr &amp;gt; 4 %then %let abort = 1; %if &amp;amp;abort %then %goto endit;&lt;BR /&gt;
   %end;&lt;BR /&gt;
&lt;BR /&gt;
%endit: options &amp;amp;savenote;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
%if &amp;amp;abort %then %put ERROR: The MKTKEY macro ended abnormally.;&lt;BR /&gt;
&lt;BR /&gt;
%mendit: %mend;&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Though, I thought I could invoke the macro as is with %mktkey and %mktroll, then make the disallowed combinations in the editor window.  Is that not right?  Do I change the macro itself?&lt;/B&gt;&lt;/LI&gt;</description>
      <pubDate>Mon, 14 Feb 2011 18:10:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Disallowed-combinations/m-p/9558#M539</guid>
      <dc:creator>L</dc:creator>
      <dc:date>2011-02-14T18:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Disallowed combinations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Disallowed-combinations/m-p/9559#M540</link>
      <description>Hi:&lt;BR /&gt;
  On page 25 of this document (about mktkey and mktroll and other Marketing Research macros), &lt;A href="http://support.sas.com/techsup/technote/mr2010.pdf" target="_blank"&gt;http://support.sas.com/techsup/technote/mr2010.pdf&lt;/A&gt;&lt;BR /&gt;
 it says:&lt;BR /&gt;
"SAS Technical Support can help you if you encounter a problem or issue while working with the market research design macros..."&lt;BR /&gt;
 &lt;BR /&gt;
  To open a track with Tech Support, fill out the form at this link:&lt;BR /&gt;
&lt;A href="http://support.sas.com/ctx/supportform/createForm" target="_blank"&gt;http://support.sas.com/ctx/supportform/createForm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 14 Feb 2011 18:43:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Disallowed-combinations/m-p/9559#M540</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-02-14T18:43:54Z</dc:date>
    </item>
  </channel>
</rss>

