The next step is to write the stored procedures. Write two stored procedures - a function and a subroutine.
The function (called vb_read_row()) returns the contents of a row in an OpenInsight table, given the table name and row name, coded as shown below:
function vb_read_row( tablename, rowname) return xlate( tablename, rowname, '', 'X')
The subroutine(called oi_change_name) simply changes the name of the argument passed to it to Francis X Bushman. In a real-life situation, the argument might be used to return a status code after running a process such as posting transactions. The subroutine is shown below:
subroutine oi_change_name (aname) aname = "Francis X Bushman" return