title: DB2/JAVA: dbjcc doesn't detect parameter marker at my SQL
body: <p>I'm using Java against a DB2 database and I'm having this error message:</p>
  <pre><code> Error: com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][10448][12695][4.19.66]  Invalid argument: Parameter marker ':machineIdsParam' was not present in the SQL String ERRORCODE=-4461, SQLSTATE=42815
  </code></pre>
  <p>with the code here below:</p>
  <pre><code>        String ENABLED_NAMED_PARAMS_YES = &quot;1&quot;;
          int DB2_DRIVER_TYPE = 4;
          
          Properties properties = new Properties(); // Create Properties object
          properties.put(&quot;user&quot;, config.getDbUser());         // Set user ID for connection
          properties.put(&quot;password&quot;, config.getDbPassword());     // Set password for connection
          properties.put(&quot;enableNamedParameterMarkers&quot;, ENABLED_NAMED_PARAMS_YES);
          properties.put(&quot;driverType&quot;, DB2_DRIVER_TYPE);
          // Load the driver
          Class.forName(&quot;com.ibm.db2.jcc.DB2Driver&quot;);
          
          //Establish connection          
          DB2Connection currentConnection = (DB2Connection) DriverManager.getConnection(config.getDbUrl(), properties);
          
          StringBuilder sb = new StringBuilder();
          sb.append(&quot;WITH mymachines AS (SELECT machineId&quot;);
          sb.append(&quot; FROM XMLTABLE('for $id in tokenize($s, \&quot;,\&quot;) return &lt;i&gt;{string($id)}&lt;/i&gt;' &quot;);
          sb.append(&quot; PASSING CAST (:machineIdsParam AS VARCHAR (100)) AS \&quot;s\&quot; COLUMNS&quot;);
          sb.append(&quot; machineId INT PATH '.')) &quot;);
          sb.append(&quot; SELECT machineId from mymachines &quot;);
          String sqlString = sb.toString();
          
          String machineIds = &quot;930,603&quot;;  // This is an input I receive as a parameter;
          DB2PreparedStatement ps = (DB2PreparedStatement) currentConnection.prepareStatement(sqlString);
          
          ps.setJccStringAtName(&quot;:machineIdsParam&quot;, machineIds);
          
          ResultSet rs = ps.executeQuery();
          while(rs.next()) {
              System.out.println(rs.toString());
          }
  </code></pre>
  <p>The strange thing is that this is code working in another Java class and I can't find the difference other than the very SQL string, which is somehow different, except for the XML table part. I suspect something is going on with the db2 driver for Java.</p>
  <p><strong>Additional data</strong>:</p>
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;com.ibm.db2&lt;/groupId&gt;
          &lt;artifactId&gt;db2jcc&lt;/artifactId&gt;
          &lt;version&gt;4.19.66&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  <p>IBM Data Server Driver for JDBC and SQLJ: <strong>4.19.66</strong></p>
  <p>SELECT VERSIONNUMBER FROM SYSIBM.SYSVERSIONS</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>VERSIONNUMBER</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>-10050900</td>
  </tr>
  <tr>
  <td>9070900</td>
  </tr>
  <tr>
  <td>10050800</td>
  </tr>
  <tr>
  <td>10051000</td>
  </tr>
  <tr>
  <td>11010405</td>
  </tr>
  <tr>
  <td>11010406</td>
  </tr>
  <tr>
  <td>11050700</td>
  </tr>
  </tbody>
  </table>
  </div>