User guide

Interface Procedures
Host Language Interface
6–12 058058 Tandem Computers Incorporated
The ENFORM query shown in Figure 6-3 contains only one FIND statement. The host
language program builds a PARAM message containing the region number. Refer to
the GUARDIAN Operating System Programmer’s Guide for the Command Interpreter
PARAM message format.
Figure 6-3. Query Used to Pass Records to COBOL Program
OPEN employee;
OPEN branch;
OPEN findfil;
PARAM region-num;
LINK branch.primkey TO employee.dept;
FIND findfil
(BY branch.regnum,
BY branch.branchnum,
employee.empname),
WHERE branch.regnum EQUAL region-num;
The source query is in the Edit file, qfind. The following ?COMPILE command is used
to compile the query and place it on the physical file, findfile.
?COMPILE qfind TO findfile
The COBOL host language program is shown in Figure 6-4. This program displays the
target record as it is received from the query processor, unformatted.