FSETMODE [ KSAM/3000 Reference Manual ] MPE/iX 5.0 Documentation
KSAM/3000 Reference Manual
FSETMODE
INTRINSIC NUMBER 14
Activates or deactivates critical output verification
IV LV
FSETMODE(filenum,modeflags);
The FSETMODE intrinsic activates or deactivates the access mode option
that permits critical output verification. This means that all output
must be verified as physically complete before control returns from an
output intrinsic (FWRITE,FUPDATE, or FREMOVE) to your program.
The access mode established by the FSETMODE intrinsic remains in effect
until another FSETMODE call is issued or until the file is closed.
PARAMETERS
filenum integer by value (required) A word identifier supplying
the file number of the file to which the call applies.
modeflags logical by value (required) A 16-bit value that denotes
the access mode options in effect. For KSAM files only
bit 14 is used; all the remaining bits are set to zeros.
Bit 14=1-- Activate Critical Output Verification
When this bit is set, all output to the
file is verified as physically complete
before an FWRITE, FUPDATE, or FREMOVE
intrinsic returns control to the user.
As soon as a logical record is written,
a CCE condition is returned to the
user.
Bit 14=0-- Deactivate Critical Output Verification
When the bit is cleared, output is no
longer verified.
CONDITION CODES
CCE Request granted.
CCG Not returned by this intrinsic.
CCL Request denied because an error occurred.
SPECIAL CONSIDERATIONS
Split stack calls permitted.
USING FSETMODE
When FSETMODE is executed with the modeflags parameter equal to 2 (bit
14=1), then each logical record written by an output intrinsic is
physically transferred to the file immediately. Control is not returned
to the user program until the transfer has been made. At that time a CCE
condition code is returned to the program.
When FSETMODE is executed with the modeflags parameter equal to zero (bit
14=0), output is treated in the standard manner. That is, when an output
intrinsic writes a logical record, the record is physically transferred
to the file only when the entire physical record (block) of which it is a
part is transferred. (Calls to FWRITE, FUPDATE, and FREMOVE send output
to the KSAM file.)
For example, the following intrinsic call activates critical output
verification:
FSETMODE(FILNUM,2);
If you want to return to normal output mode, you can use the call:
FSETMODE(FILNUM,0);
When the file is first opened and when it is opened subsequently
following an FCLOSE call, the critical output verification mode is
deactivated.
MPE/iX 5.0 Documentation