COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
file-name
is the COBOL file name of the file to be affected. It must be the name of a file defined by an
FD, not a sort-merge file description (SD). At the time the ENTER statement is executed, the file
connector referenced by file-name must not be open.
new-length
is the new maximum record size. It must be less than 4096 and must not be larger than the
length specified in the RECORD clause in the FD; if no RECORD clause is specified,
new-length must not be larger than the largest record description associated with the FD.
The compiler cannot determine if the new size is too large; improper use can cause corruption
when reading the file. It is your responsibility to ensure this does not happen.
If you omit new-length, the run-time system queries the file that will be assigned when the
file is opened and uses the maximum record length from that file.
return
is a variable into which the routine places a value indicating the success of the operation:
MeaningValue
The operation was successful.0
The first parameter is missing.1
One of these occurred:2
• The first parameter is not a file-name of an FD.
• The second parameter is greater than 4095.
The second parameter has been omitted and no file exists from which to obtain the record
length.
3
The file is not closed.5
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.
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.
634 Libraries and Utility Routines










