4.1 What Is a Process and What Is a Function?

A process is a group of related functions.

When used in an interactive environment a process appears to be a menu of associated functions.

When used in a batch environment a process usually consists of only one function or a group of closely related functions (such as related reports).

A function is an executable IBM i "program" that was defined by a user and created by LANSA.

A function usually manipulates the IBM i database in some way.

For instance an interactive process named ORDERS which has 4 functions associated with it can be visualized like this:

 

       _____________________________________________

     |                                              |

     |               PROCESS : ORDERS               |

     |                                              |

     | Enter number or place cursor on same line :  |

     |                                              |

     | _ 1. Input details of a new order            |

     |   2. Change an existing order                |

     |   3. Browse customer master file             |

     |   4. Browse product master file              |

     |                                              |

     |______________________________________________|

                           |

      _____________________|______________________

      |              |              |             |

 _____|_____   ______|_____   ______|_____   _____|______

|           | |            | |            | |            |

|Function 1 | | Function 2 | | Function 3 | | Function 4 |

|           | |            | |            | |            |

|Input new  | |   Change   | |   Browse   | |   Browse   |

| order     | |  existing  | |  Customer  | |   Product  |

|           | |   order    | |   Master   | |   Master   |

|___________| |____________| |____________| |____________|

 

Some of the characteristics of processes and functions are:

The topics in this chapter describe how processes and functions are created and changed using the LANSA system.