The application template BBRDMLBIF will generate the function skeleton for an RDML Built-In Function. You may wish to review RDML Built-In Function Tips and Techniques prior to executing the template.
RPG/400 and ILE Skeleton Program
Control Language (CL) Skeleton
Subroutine Skeleton
C Skeleton Program