7.9.2 CALL Comments / Warnings

Calling a Process or Function

CALL PROCESS(TEST) FUNCTION(FUNCB)

to invoke another RDML function called FUNCB, what actually happens is this:

                      ____________

                     |            | 

                     |  Function  |

                     |   FUNCA    |

                     |____________| 

                           |

                         calls

                           |

                      _____|______

                     |            | 

                     |  Process   |

                     |"Controller"|

                     |   TEST     |

                     |____________|

                           |

                         calls

                           |

                      _____|______

                     |            | 

                     |  Function  |

                     |   FUNCB    |

                     |____________|

1.  Include the command FUNCTION OPTIONS(*DIRECT) into FUNCB (note that is FUNCB) then recompile it. This simply specifies that FUNCB is eligible for direct mode invocation and it will not affect FUNCB in any way.

2.  Change the call command in FUNCA to be like this:

CALL PROCESS(*DIRECT) FUNCTION(FUNCB)

     then recompile FUNCA. This indicates that function FUNCB should be called in direct mode, rather than via its process controller named TEST.

     After these changes, the CALL will work like this:

                        ____________

                       |            |  

                       |  Function  |

                       |   FUNCA    |

                       |____________|

                             |

                           calls

                             |

                        _____|______

                       |            |

                       |  Function  |

                       |   FUNCB    |

                       |____________|

 

 

Calling a User Program