Guardian Procedure Calls Reference Manual
CONTROLBUF Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Considerations
Messages
Summary
The CONTROLBUF procedure is used to perform device-dependent I/O operations requiring a
data buffer.
NOTE: The CONTROLBUF procedure performs the same operation as the FILE_CONTROLBUF64_
Procedure (page 382), which is recommended for new code.
Key differences in FILE_CONTROLBUF64_ are:
• The pointer and tag parameters are 64 bits wide.
• The count parameter is 32 bits wide.
• The procedure returns an error code value rather than a condition code, simplifying
error-handling code.
Syntax for C Programmers
#include <cextdecs(CONTROLBUF)>
_cc_status CONTROLBUF ( short filenum
,short operation
,short _near *buffer
,short count
,[ short _near *count-transferred ]
,[ __int32_t tag ] );
• CEXTDECS (through the included file TNSINTH) defines 32-bit values as the typedef
__int32_t, which for TNS and TNS/R compiles is defined as long and for TNS/E compiles
is defined as int.
• The function value returned by CONTROLBUF, which indicates the condition code, can be
interpreted by _status_lt(), _status_eq(), or _status_gt() (defined in the file
tal.h).
Syntax for TAL Programmers
CALL CONTROLBUF ( filenum ! i
,operation ! i
,buffer ! i
,count ! i
,[ count-transferred ] ! o
,[ tag ] ); ! i
212 Guardian Procedure Calls (C)