FILE
FILE name filetype "open_filename" [DESCRIPTION "description"] [LONG DESCRIPTION "long_desc"] [USER TEXT "string"] [RECTYPE rectype] [PAGE SIZE page_size] [DENSITY percentage] [NODENSITY] [ADDRESSING addressing] [SIZE LIMIT size_limit] [NOSIZE LIMIT] [RECORD LIMIT record_limit][NORECORD LIMIT] [TEMPORARY] [NOTEMPORARY] [COMPRESS] [NOCOMPRESS] [STATIC RFA] [NOSTATIC RFA] [TRACK CHANGES] [NOTRACK CHANGES] [TERABYTE] [NOTERABYTE] [STORED GRFA] [NOSTORED GRFA] [NOROLLBACK] [ROLLBACK] [NETWORK ENCRYPT] [NONETWORK ENCRYPT][PORTABLE "integer_specs"] [NOPORTABLE] [FILE TEXT "file_text"] [NOFILE TEXT] [ASSIGN structure [ODBC NAME name] [, structure [ODBC NAME name]] [, ...]]
Arguments
name
The name of a new or existing file definition. This name can have a maximum of 30 characters.
filetype
The type of file this definition describes. Valid values are
ASCII
DBL ISAM
RELATIVE
USER DEFINED
“open_filename”
The name of the actual data file, including the path specification. It can have a maximum of 64 characters and must be enclosed in double or single quotation marks ( “ ” or ‘ ’ ).
DESCRIPTION “description”
(optional) A description of the file definition. It can have a maximum of 40 characters and must be enclosed in double or single quotation marks ( “ ” or ‘ ’ ). This description is available when Repository displays a list of files.
LONG DESCRIPTION “long_desc”
(optional) A more detailed description of the file definition and its use. It can contain 30 lines of up to 60 characters each. Each line must be enclosed in double or single quotation marks ( “ ” or ‘ ’ ).
USER TEXT “string”
(optional) A user-defined text string. It can contain a maximum of 60 characters and must be enclosed in double or single quotation marks ( “ ” or ‘ ’ ).
RECTYPE rectype
(optional) Specifies the record type. This value is ignored if specified for a filetype other than DBL ISAM. Valid values are FIXED (default), VARIABLE, MULTIPLE.
PAGE SIZE page_size
(optional) Specifies the index block page size. This value is ignored if specified for a filetype other than DBL ISAM. Valid values are
512
1024 (default)
2048
4096
8192
16384
32768
(optional) Specifies the key density percentage used for all keys in the file. Used for DBL ISAM files only. Percentage must be between 50 and 100, inclusive. The default density is around 50%.
NODENSITY
(optional) Specifies that the default key density (around 50%) is to be used for all keys in the file.
ADDRESSING addressing
(optional) Specifies the address length of the ISAM file. This value is ignored if specified for a filetype other than DBL ISAM. Valid values are 32BIT (default) and 40BIT.
SIZE LIMIT size_limit
(optional) Specifies the maximum number of megabytes that the data file (.is1) is allowed to reach. This value applies only to REV 6 or greater ISAM files and is ignored if specified for a filetype other than DBL ISAM.
NOSIZE LIMIT
(optional) Indicates that there is no size limit for this file.
RECORD LIMIT record_limit
(optional) Specifies the maximum number of records that the file is allowed to contain. This value applies only to REV 6 or greater ISAM files and is ignored if specified for a filetype other than DBL ISAM.
NORECORD LIMIT
(optional) Indicates that the file has no record limit.
TEMPORARY
(optional) Specifies that the file definition is a temporary one and will be excluded from the list of available files if used in ReportWriter or xfODBC.
NOTEMPORARY
(optional) Specifies that the file definition is not a temporary one and will be included in the list of available files if used in ReportWriter or xfODBC.
COMPRESS
(optional) Specifies that the data in the file is compressed. This value is ignored if specified for a filetype other than DBL ISAM.
NOCOMPRESS
(optional) Specifies that the data in the file is not compressed.
STATIC RFA
(optional) Used for DBL ISAM files only and specifies that the records in this file will retain the same RFA across WRITE operations. This value is ignored if specified for a filetype other than DBL ISAM.
NOSTATIC RFA
(optional) Specifies that the records in this file will not retain the same RFA across WRITE operations.
TRACK CHANGES
(optional) Specifies that change tracking is enabled in this file. This value applies only to REV 6 or greater ISAM files and is ignored if specified for a filetype other than DBL ISAM.
NOTRACK CHANGES
(optional) Specifies that change tracking is not enabled in this file.
TERABYTE
(optional) Specifies that this is a 48-bit terabyte file. This value is ignored if specified for a filetype other than DBL ISAM.
NOTERABYTE
(optional) Specifies that this is not a 48-bit terabyte file.
STORED GRFA
(optional) Specifies that the CRC-32 portion of an RFA is to be generated and stored to each record header on each STORE or WRITE operation. This value is ignored if specified for a filetype other than DBL ISAM.
NOSTORED GRFA
(optional) Specifies that the CRC-32 portion of an RFA is not to be generated and stored to each record header on each STORE or WRITE operation.
NOROLLBACK
(optional) Specifies that change tracking rollbacks to the file are prohibited. This value applies only to REV 6 or greater ISAM files and is ignored if specified for a filetype other than DBL ISAM.
ROLLBACK
(optional) Specifies that change tracking rollbacks to the file are permitted.
NETWORK ENCRYPT
(optional) Specifies that clients accessing this file must use encryption. This value is ignored if specified for a filetype other than DBL ISAM.
NONETWORK ENCRYPT
(optional) Specifies that clients accessing this file must not use encryption.
PORTABLE “integer_specs”
(optional) One or more non-key portable integer data specifications that can be passed as arguments to the ISAMC subroutine. Used for DBL ISAM files only. Non-key integer data specifications have the following syntax:
I=pos:len[,I=pos:len][,...]
where pos is the starting position of non-key portable integer data and len is its length in bytes (1, 2, 4, or 8). No validation is performed on this string.
NOPORTABLE
(optional) Specifies that no non-key portable integer data specifications are defined for the file.
FILE TEXT “file_text”
(optional) A specification for text to be added to the header of the file and/or space to be allocated for user-defined text. This value applies only to REV 6 or greater ISAM files and is ignored if specified for a filetype other than DBL ISAM. The syntax of the specification must be one of the following:
text_size[K] "text_string" text_size[K]:"text_string"
where text_size is the amount of space to allocate in bytes (rounded to the nearest kilobyte) for user-defined text, and text_string is a text string to add to the file header. No validation is performed on this string.
NOFILE TEXT
(optional) Specifies that no file text specification is defined for the file.
ASSIGN structure
(optional) The name of one or more structures to assign to the file, separated with commas. The maximum number of structures that can be assigned to the file is 200. The maximum size of a structure name is 30 characters.
ODBC NAME name
(optional) Indicates the table name to use for ODBC access. The maximum size of a table name is 30 characters.
Discussion
The FILE statement is used to describe a file definition. File definitions determine which files can be accessed through Repository and which structures can be used to access them.
Only structures whose file type matches that of the file definition can be assigned to a definition. Also, the structure must have at least one field defined. When you assign the second or a subsequent structure to a file, the primary key definition must match those of already assigned structures. (The primary key is assumed to be the first key defined and must be an access key.) Specifically, the following key information must match:
- Key size
- Sort order
- Dups allowed flag
- Key data type
- Number of segments
- Type, position, length, and order of each segment
Adding new definitions
The maximum number of files that can be defined is 9,999.
Replacing existing definitions
All required keywords and data must be specified. The existing file and its list of assigned structures are cleared and set to the specified attributes. To disassociate structures from a file, specify only the ones you want to keep. Omitting the ASSIGN keyword will disassociate all assigned structures.
Overlaying existing definitions
Name, filetype, and open_filename must be specified, because they are position-dependent. The current file attributes are overwritten with any new attributes specified. All assigned structure names (and corresponding ODBC table names) must be respecified when changing one or more. To clear all assigned structures, use the Replace option in the Load Repository Schema utility.
Examples
FILE cmclnt dbl isam "FIL:cmclnt" DESCRIPTION "CM Clients" ASSIGN client FILE cusmas dbl isam "FIL:cusmas" DESCRIPTION "Customer Master" RECTYPE variable DENSITY 75 PORTABLE "I=10:8,I=20:4" ASSIGN cusmas1,cusmas2