19.1.3 Steps to Create 3GL Built-In Functions on IBM i

1.  Design the Built-In Function.

2.  Allocate the next unique number. If this is a User Defined (UD) Built-In Function, use the next available number between 401 and 600. If this is an Other Vendor (OV) Built-In Function, then you must use the next available number in the LANSA allocated range. To obtain the next number, send a request to lansasupport@LANSA.com.au

3.  Give the Built-In Function a name. Use something that even a non-programmer would understand. Prefix your own User Defined BIFs with 'UD_' and Other Vendor BIFs with 'OV_' for easy identification.

4.  Give the Built-In Function program/subroutine a name. Refer to 19.1.2 Naming Conventions for 3GL BIF on IBM i for guidance if necessary.

5.  Complete a Built-In Function definition form. You can print the example supplied in 19.4 Built-In Function Sample Form or one that you have designed yourself.
Note: This step is not compulsory but it is a good idea if this is your first Built-In Function. It is meant as an aid to translating your Built-In Function design into the necessary code for use with LANSA.

6.  Enter the relevant information into the Built-In Function definition files (DC@F47 and DC@F48). This can be done by creating DFU applications over files DC@F47 and DC@F48, or by writing a simple data entry program over these files. If this data is incorrect, then the Built-In Function will not work as expected.

Note: This step must be performed. If the Built-In Function is not described in these files then it will not be recognized by LANSA.

7.  Code your program or subroutine. Use the sample 19.5 Built-In Function Skeletons as a guide to coding Built-In Function programs/subroutines.