COBOL Manual for TNS and TNS/R Programs
Libraries and Utility Routines
HP COBOL Manual for TNS and TNS/R Programs—522555-006
13-67
COBOL_SETMODE_
return
is a variable into which the routine places a value indicating the success of the
operation:
Usage Consideration: If you use COBOL_ASSIGN_ or another method to assign the
physical file before the OPEN occurs, that assignment must take place before you call
COBOL_SET_MAX_RECORD_.
COBOL_SETMODE_
The COBOL_SETMODE_ routine sets device-dependent functions using a call to the
Guardian environment routine SETMODE.
If a NOWAIT input-output request is active when the COBOL_SETMODE_ routine is
called, the request is completed before the SETMODE routine is called. If the file is
closed when the call is made, the request is queued until the next OPEN request for
the file is issued.
Value Meaning
0 The operation was successful.
1 The first parameter is missing.
2 One of these occurred:
•
The first parameter is not a file-name of an FD.
•
The second parameter is greater than 4095.
•
For the non-CRE environment: the FD is external.
3 The second parameter has been omitted and no file exists from which to obtain
the record length.
5 The file is not closed.
Caution. The HP COBOL run-time library does not attempt to validate calls to SETMODE. To
avoid interfering with the operation of the HP COBOL run-time library, use
COBOL_SETMODE_ only if absolutely necessary.