Task member functions gain access to the TGDEs (Task Global Data Elements) by linking specified formal parameters in the function to matching fields in the TGDA through a process known as 'mapping'.

You define the mapping in a screen provided in the development environment, and specify the global Task data elements by specifying the global name, usage, data type and size, array size (if any) and usage.

The usage of each Task formal parameter determines whether the value of the parameter in the TGDA is returned to the caller. Only if a Task formal parameter has ‘Out’ or ‘Both’ usage will the then-current value in the parameter’s storage area in the TGDA be returned to the caller at the end of Task execution.

Global data elements are never written to by Task parameters, and are never returned to the Task’s caller.

Comment on this topic

Topic ID: 540089