At runtime, the following processing sequence occurs for each function:
The runtime system maintains an operand XDE/VXDE for each function parameter. The XDE/VXDE pair describes the parameter as it is stored in the IRA and contains the parameter's IRA address.
Internal Representation of a Function at Run Time
The internal representation of a substring function is illustrated below.
An arrow indicates that the source structure contains the address of the object structure, illustrating that the processing program module can use register 1 to gain access to all required information.
Field names containing the addresses are listed next to the arrows.
SUBSTRING(EMP-NAME, START-POS-1) XDEs VXDEs INTERMEDIATE RESULT AREA ┌───────────────┐ ┌───────────────┐ ┌─────────────────────┐ │Operand XDE │ VXDEXDEA │Operand VXDE │ VXDEDADR │ │ │for first ◄──────────┤for first ├────────────► │First parameter │ │ │parameter │ │parameter │ │ └────────────────┘ │ │(EMP-NAME) │ │(EMP-NAME) │ │ │ └───────────────┘ └───────────────┘ │ │ ▲ ┌──► │Second parameter│ │ │ VXDESNXT │ │ └────────────────┘ │ ┌───────────────┐ ┌──────┴────────┐ │ │ │ │Operand XDE │ VXDEXDEA │Operand VXDE │ VXDEDADR│ │ │ │for second ◄──────────┤for second ├─────────┘ │ │ │parameter │ │parameter │ ┌──► │Result field │ │ │(START-POS-1) │ │(START-POS-1) │ │ │ └────────────────┘ │ └───────────────┘ └───────────────┘ │ └─────────────────────┘ ▲ │ │ VXDESNXT │ ┌───────────────┐ ┌──────┴────────┐ │ │Dummy operand │ VXDEXDEA │Dummy operand │ │ │XDE for omitted◄──────────┤VXDE for omit─ │ │ │third parameter│ │ted third │ │ └───────────────┘ │parameter │ │ └───────────────┘ │ ▲ │ │ VXDESNXT │ ┌───────────────┐ ┌──────┴────────┐ VXDEDADR│ ┌───────────────────┐ │Function XDE │ VXDEXDEA │Function VXDE ├─────────┘ │ │ │for substring ◄──────────┤for substring ├────────────► WORK AREA │ │function │ │function │ VXDEUWKA │ │ └───────────────┘ └───────────────┘ └───────────────────┘ ▲ │ ┌──────┴────────┐ │ Register 1 │ │ │ └───────────────┘
|
Copyright © 2014 CA.
All rights reserved.
|
|