title: SAS CATX Error: Null Parameters for CATX are invalid
body: <p>I am trying to concatenate some variables in SAS Enterprise guide. </p>
  
  <p>I start with a <code>SAS_table</code>, which looks something like (note the empty column <code>plums</code> and the empty observation for <code>pears</code>: </p>
  
  <pre><code>id      farm         apples        pears           cherries          plums
  1       'Munich'     'Granny'      'Williams'      'RedDelight'
  2       'Amsterdam'  'PinkLady'                    'Scrumptious
  3       'Moscow'     'Braeburn'    'Williams'      'RedDelight'     
  </code></pre>
  
  <p>Then I create global variables as follows: </p>
  
  <pre><code>%do i = 1 %to 3; 
      %global farm_&amp;i., apples_&amp;i., pears_&amp;i., cherries_&amp;i., plums_&amp;i.;
  %end; 
  </code></pre>
  
  <p>And I store the above table in the global variables as follows: </p>
  
  <pre><code>data _NULL_; 
      set SAS_table; 
      %do i = 1 %to 3; 
          if id = &amp;i. then do; 
              call symput("farm_&amp;i.", farm); 
              call symput("apples_&amp;i.", apples); 
              call symput("pears_&amp;i.", pears); 
              call symput("cherries_&amp;i.", cherries); 
              call symput("plums_&amp;i.", plums); 
          end; 
      %end;
  run; 
  </code></pre>
  
  <p>All of the above seems to work smoothly. In a next step I want to the individual variables to get the following output (please note that empty values are just skipped - no extra delimiter (" :: ") is set for these cases): </p>
  
  <pre><code>concat_1:      Munich :: Granny :: Williams :: RedDelight
  concat_2:      Amsterdam :: PinkLady :: Scrumptious
  concat_3:      Moscow :: Braeburn :: Williams :: RedDelight
  </code></pre>
  
  <p>To do this, I use the following code: </p>
  
  <pre><code>data _NULL_; 
      %do i = 1 %to 3;
           call_symput("concat_&amp;i",catx(" :: ", &amp;&amp;farm_&amp;i., &amp;&amp;apples_&amp;i.., &amp;&amp;pears_&amp;i.., 
               &amp;&amp;cherries_&amp;i.., &amp;&amp;plums_&amp;i..));
      %end;
  run; 
  </code></pre>
  
  <p>However, when I run this code I get the error: </p>
  
  <pre><code>ERROR 159-185: Null parameters for CATX are invalid.
  </code></pre>
  
  <p>My assumption here is that SAS is unhappy because some of the variables can be empty values. But how do I fix this? I've messed around loads and just can't seem to find a good answer. </p>