Version 4.2.6 for Mainframes
 —  Database Management System Interfaces  —

NDB - Example Natural UDF

This section describes the example UDF NAT.DEM2UDFN, a Natural subprogram used to calculate the product of two numbers.

The example UDF NAT.DEM2UDF comprises the following members that are supplied in the Natural system library SYSDB2:

Member Explanation
DEM2CUDF Contains SQL statements used to create DEM2UDFN (see below).
DEM2UDFP

The client (Natural) program that

  • Fetches rows from the NAT.DEMO table,

  • Invokes the UDF NAT.DEM2UDFN (see below) in the WHERE clause, and

  • Displays the rows fetched.

DEM2UDFN The UDF that builds the product of two numbers. DEM2UDFN has to be copied to the Natural library NAT on the FUSER in the executing environment.

Top of page