The DO operation is one of the functions that can be used within wizard expressions. It's not a function in the normal sense, but rather it provides access to internal services exposed to Lua.
The normal function call syntax in Lua is used where the function name is one of the operations identified in the Processes and Operations list.
The number and type of parameters is dependent on the operation. There may be up to 24. Each may be an input parameter or an output parameter.
In Lua scripts, a DO function returning an error will cause an error to be thrown and the script will terminate (unless you catch the error in your script using pcall or xpcall).
The operations available, their syntax and semantics, is defined under the DO Operations topic in the help file for each system module, e.g. DO Operations in the Material Stock module. In those descriptions the parameters are identified by quoting the logical type name that is expected, preceeded by either a '+' symbol or a '-' symbol. When preceeded by a '+' it indicates the parameter is an input parameter (i.e. passed to the function). When preceeded by a '-' symbol it indicates the parameter is an output parameter (i.e. the function passes it out as a result). Sometimes a '-' parameter can be both an input and an output.
Its Lua usage syntax is:
R1,...,R24 = match_it.operation(P1,...,P24)
The operation is the name of the function. In Lua, the syntax of the call of a DO function is the same as any other function. Only the output parameters (if any) of the function called are returned as results (R1..R24). The passed parameters (P1..P24) may be omitted or nil, in which case an 'empty' value of the appropriate type is passed to the function. If an output parameter is given in the parameter list (P1..P24) then it supplies an initial value for the output to the function.