title: Declare a variable using IBM iSeries Navigator "Run SQL Scripts" utility
body: <p>I'm new to IBM DB2, using the iSeries Navigator, IBM iSeries Access for Windows Version 5 Release 4, the "Run SQL Scripts" utility.</p>
  
  <p>Is it possible to use a variable in this utility?  A number of Stack Overflow answers (and answers on other forums) instruct one to use code like the following:</p>
  
  <pre><code>BEGIN ATOMIC
  DECLARE x VARCHAR(1);
  SET x = 'A';
  SELECT * FROM  MySchema.MyTable Where MyColumn = x;
  END@
  </code></pre>
  
  <p>This does not work inside the "Run SQL Scripts" utility, throwing the exception "Token ATOMIC was not valid."  If I remove the keyword ATOMIC I get the error "Token X was not valid."  If I remove the entire BEGIN and END lines I get the error "Token VARCHAR was not valid."</p>
  
  <p>Another set of answers instruct one to use code like the following, which also fails with the same "...not valid" errors:</p>
  
  <pre><code>CREATE VARIABLE x VARCHAR(1) DEFAULT ('A');
  SELECT * FROM MySchema.MyTable WHERE MyColumn = x;
  DROP VARIABLE x;
  </code></pre>
  
  <p>Is it possible to declare variables in the "Run Sql Scripts" utility?</p>