PL/MX environment

PL/MX development environment

PL/MX functions are written using a text editor and submitted for compilation and storage in the NonStop SQL/MX database using the CREATE FUNCTION statement. The PL/MX compiler (PLMXCMP) may also be run in standalone mode to check the syntax of a PL/MX module. For more information on the standalone compilation mode, see The Standalone Compiler.

PL/MX execution environment

Once PL/MX UDRs are successfully created, they can be used in SQL queries. The UDR server loads the executable (object code) of each UDR when it is first encountered during the execution of a query. On the first and subsequent invocation of the UDR, the NonStop SQL/MX executor passes any parameters needed to the UDR server, which executes the UDR code in the SQL Virtual Machine (SVM). As each UDR call completes, the UDR server returns any of the function return or output values back to the NonStop SQL/MX executor, which incorporates them into the query data flow.