ENFORM User's Guide

Interface Procedures
Host Language Interface
058058 Tandem Computers Incorporated 6–19
The final example finds data on employees whose age is less than 30.
The following DDL description is added to the data dictionary to describe the record
being passed.
Figure 6-8. DDL Description of Record Passed to FORTRAN Program
RECORD fortsrce.
FILE IS "fortsrce" UNSTRUCTURED.
02 who.
03 empnum PIC "9999".
03 empname PIC "X(18)".
02 info.
03 job PIC "X(12".
03 age TYPE BINARY.
END.
The ENFORM query in Figure 6-9 creates a FIND file named “fortsrce”. This data will
be passed to the FORTRAN program.
Figure 6-9. Query Used to Pass Records to FORTRAN Program
OPEN employee, fortsrce:
FIND fortsrce (employee.empnum,
employee.empname,
employee.job,
employee.age)
WHERE employee.age < 30;
The query is compiled with the following command:
?COMPILE $data.queries.fortsrce to $data.queries.enfrmobj;
Figure 6-10 shows the FORTRAN program that interfaces with ENFORM to process
these records. The program receives, formats, and displays the target record.
Comments are preceded by the letter “C.”