NonStop Systems Introduction
The Relational Database Management System
NonStop Systems Introduction—527825-001
4-8
Programming Interface
Figure 4-4 on page 4-8 shows the relationship between the end user and the MXCI 
interface. The user submits a query to MXCI and receives output data from MXCI at 
the display screen or printer.
If the query made by the user in Figure 4-4 is a simple SELECT statement, MXCI 
accesses the specified table, constructs a temporary table containing the data retrieved 
by the query, and displays the data on the screen or printer.
If the query includes report formatting commands in addition to the SELECT statement, 
MXCI constructs a formatted report with a title, column headings, page numbers, and 
any other formatting the user specified. MXCI sends this report to the workstation or 
printer, depending on what the user specified.
The following commands enable the user to produce a formatted report showing the 
name and number of all those employees in the EMPLOYEE table who are in 
department 4000. The report includes a title and a special heading for each column.
OUT_REPORT $S.#PRINT;
SET list_count 0;
SELECT fname, lname, empnum
FROM employee
WHERE deptnum = 4000;
REPORT TITLE "Employee List, Dept 4000";
DETAIL fname HEADING "Employee Name",
lname NOHEAD,
empnum HEADING "Number";
LIST ALL;
Programming Interface
This subsection presents a brief overview of the SQL/MX programming interfaces.  For 
detailed information about these interfaces, see the SQL/MX Programming Manual for 
C and COBOL and the SQL/MX Programming Manual for Java.
The SQL/MX programming interface enables developers to embed their tested SQL 
statements within source code written in languages such as C, C++, and Java. To 
compile a C or C++ source program containing embedded SQL statements, you run 
both the host language compiler and the SQL/MX compiler. SQL/MX automatically 
Figure 4-4. SQL/MX Conversational Interface (MXCI)
MXCI
VST047.vsd










