company logo

FROM FILE keyword

The keyword can be written in capital or small letters, but not mixed. Using capital letters refers to a reserved keyword. In order to refer to the file input function from within an operation path, the from-file keyword should be used, instead.

The FROM FILE keyword requires a file specification as parameter:

from file ( Path=file_path | PathOption=option_name,

FileType=file_type, Headline=headline_opt,

Definition=type_def, Source=source_name )

file_path - Complete file path to be imported

option_name - Alternatively to the file path an option name may be defined. The option must be set to the file path. The option name is also used as extent name for the external file collection. In case of XML export, it refers to the name of the root element.

file_type - File storage format (xml, csv, oif, esdf) when this is different from the file name extension.

headline_opt - Headline option indicates for csv or esdf files the first line contains a headline and should be ignored.

type_def - Name of data type definition defining for the collection in database. Instead of a type definition a file name for a definition file (ODL, ESDF or XML format) may be defined.

source_name - Property definitions in type definitions for external data sources may contain any number of source definitions. Source definition to be used for import may be identified by source name. When no source name has been passed, the first source definition for each property is used. File type definitions contain only one source for each property, which is not named, i.e. source name must not be defined when providing an external (file) definition.

fromFile( Path='c:/temp/my_persons.xml', FileType='xml',

          Definition='c:/temp/my_persons.def', Headline = false)

Notes:

Calling the fromFile operation in an OSI application several times, parameter values are used for initialization only when calling the operation the first time. Hence, changing parameters for next call will not have any effect.

Definition: 

_fromfile             := __fromfile | fromfile__

fromfile__            :: 'fromFile'

__fromfile            := _from _file

_from                 := 'from'         | __from

__from                :: 'FROM'

_file                 := 'file'         | __file

__file                :: 'FILE'