Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual—522629-013
5-37
FILE_CREATE_ Procedure
blocklen input
INT:value
for structured files, specifies the length in bytes of each block of records in the file.
For unstructured files, it controls the buffer size used internally but does not limit
user transfer sizes (though data transfers are more efficient when they do not
exceed
blocklen).
For structured files,
blocklen must be at least recordlen + 24. For key-
sequenced files,
blocklen must be at least recordlen + 34.
The system rounds up the specified value to 512, 1024, 2048, or 4096. If omitted,
the default size is 4096. Regardless of the specified record length and data-block
size, the maximum number of records that can be stored in a data block is 511.
keylen input
INT:value
for key-sequenced files, specifies the length in bytes of the primary-key field. The
maximum length is 255. This parameter is required for key-sequenced files. For
queue files, this parameter must include 8 bytes for a timestamp.
key-offset input
INT:value
for key-sequenced files, specifies the offset from the beginning of the record to the
beginning of the primary-key field. This parameter is required for key-sequenced
files. For queue files, the value of this parameter must be 0.
Considerations
•
File pointer action
The end-of-file pointer is set to 0 after the file is created.
•
Disk allocation with FILE_CREATE_
Execution of the FILE_CREATE_ procedure does not allocate any disk area; it only
provides an entry in the volume’s directory, indicating that the file exists.
•
Altering file security
The file is created with the caller’s process file security, which can be examined
and set with the PROCESS_SETINFO_ procedure. Once a file has been created,
its file security can be altered by opening the file and issuing the appropriate
SETMODE and SETMODENOWAIT procedure calls.