Guardian Procedure Calls Reference Manual
CONTROL Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Operations
Considerations
Related Programming Manuals
Summary
The CONTROL procedure is used to perform device-dependent I/O operations.
NOTE: The CONTROL procedure performs the same operation as the FILE_CONTROL64_
Procedure (page 379), which is recommended for new code.
Key differences in FILE_CONTROL64_ are:
• The tag parameter is 64 bits wide.
• The procedure returns an error code value rather than a condition code, simplifying
error-handling code.
Syntax for C Programmers
#include <cextdecs(CONTROL)>
_cc_status CONTROL ( short filenum
,short operation
,[ short param ]
,[ __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 CONTROL, 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 CONTROL ( filenum ! i
,operation ! i
,[ param ] ! i
,[ tag ] ); ! i
Parameters
filenum
input
INT:value
is a number of an open file, identifying the file to which the CONTROL procedure performs an
I/O operation.
206 Guardian Procedure Calls (C)