User guide

Interface Procedures
Host Language Interface
6–8 058058 Tandem Computers Incorporated
ENFORMRECEIVE
Procedure
The ENFORMRECEIVE procedure provides records to the host application program,
one at a time. The syntax of the ENFORMRECEIVE procedure is:
COBOL:
ENTER ENFORMRECEIVE USING
ctlblock
,
buffer
[ GIVING
count
]
FORTRAN:
count
= ENFORMRECEIVE (
ctlblock
,
buffer
)
TAL:
[
count
:= ] ENFORMRECEIVE (
ctlblock
,
buffer
)
count
returns a byte count for the length of the record retrieved (all FIND output records
are the same length). A zero value means that all records have been returned.
ctlblock
INT:ref, is the same 18-word integer array control block that was supplied to
ENFORMSTART for global storage among all ENFORM procedure calls. The host
application program must not change the control block between calls to ENFORM.
buffer
INT:ref, is a pointer to the receiving buffer in the host application program for an
output record. It must be at least as long as the value given for buffer-length in
ENFORMSTART. The parameter buffer should be declared as FORTRAN record
type if you want to access character information in a FORTRAN program.
Condition code settings:
< (CCG) indicates that no more target records exist.
= (CCE) indicates successful receipt of a target record.
> (CCL) indicates a query processor error occurred; buffer contains additional
error information, and error-number (passed to ENFORMSTART)
contains an error number greater than zero.
FORTRAN programs must contain special code in order to examine the condition code
settings.
ENFORMRECEIVE sends the records to the host language program, one at a time.
Hence, ENFORMRECEIVE is repeatedly called until an end-of-file condition occurs,
ENFORMFINISH is called, or an error condition occurs.