Locate simple large objects in named files
EXEC SQL BEGIN DECLARE SECTION;
loc_t my_simple_lo;
EXEC SQL END DECLARE SECTION;
;
my_simple_lo.loc_loctype = LOCFNAME;
To use a named file as a simple-large-object location, your program must specify a pointer to the file name in the loc_fname field of the locator structure. You must also set the loc_oflags field with a file-open mode flag to tell how to access the file when it opens it.
To open a named file, opens
the file named in the loc_fname field with the mode flags that
the loc_oflags field specifies. If this file does not exist, creates
it. then
puts the file descriptor of the open file in the loc_fd field
and proceeds as if your program opened the file. If cannot
open this file, it sets the loc_status field (and SQLCODE)
to -461
. When the transfer is complete, closes
the file, which releases the file descriptor in the loc_fd field.
- The getcd_nf.ec program selects a simple large object into a named file.
- The updcd_nf.ec program inserts a simple large object from a named file.
getcd_of mystores