Db2 table view

A Db2® table view must exist for each file. The name of the Db2 table view to use is retrieved from the <viewName> data descriptor element. The view name in the data descriptor must exactly match the name of a Db2 view for the table.

An example of a table view is shown here:
create view ibmPvrAmountTable
  (rowNumber,
   relid,
   ibmIntAmountPrefix,
   ibmIntAmountLow,
   ibmIntAmountHigh,
   ibmNprRecordType,
   ibmNprControlDoc,
   ibmNprRecordId,
   ibmIntEndorseId,
   ibmIntPcPrefix,
   ibmIntAccountPrefix,
   ibmIntField4Prefix,
   ibmIntEpcPrefix,
   ibmIntAuxPrefix)
  as select
   cast(Row_Number() OVER (ORDER BY a.amount_prefix, length(rtrim(a.amount_start)),
   rtrim(a.amount_start)) as INT) ,
   a.relid,
   a.amount_prefix,
   a.amount_start,
   a.amount_end,
   a.record_type,
   t.control_doc,
   a.record_id,
   a.endorse_id,
   a.pc_prefix,
   a.account_prefix,
   a.field4_prefix,
   a.epc_prefix,
   a.auxonus_prefix
  from amount a left outer join record_types t
  on a.relid = t.relid and a.record_type=t.record_type;

Each field name in the record layout must exactly match the name of a column in the database view (it is not case-sensitive). The Business Rules Manager constructs an SQL select statement that uses the <viewName> (database view name) and field names (database column names) to select all rows from the Db2 view for the specified release ID. The data that is retrieved for each row in the table is written to a flat file. It is formatted by using the data format and length that is specified for each field in the data descriptor. The name of the flat file that is created in this process is specified the <filename> data descriptor element.