title: How to invoke json_val function in db2 json?
body: <p>I'm trying to index a particular value from stored DB2 nosql, for that I'm using json_val but I need to invoke UDF SYSTOOLS.BSON2JSON to the <code>json_val</code> and need to point the table from where I required data.</p>
  
  <pre><code>SELECT SYSTOOLS.BSON2JSON(CUSTOMERDATA)
  FROM  JSONPO
  WHERE YEAR(JSON_VAL(CUSTOMERDATA,'PO.@orderDate', 'd')) = 2017;
  </code></pre>
  
  <p>The above query resulting in sql error -440 so I need to invoke the json_val. How would I invoke it? How would I write stored procedure for it?</p>