Oracle9i OLAP Services Developer's Guide to the OLAP DML
Release 1 (9.0.1)

Part Number A86720-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Reading Data from Files, 2 of 9


Introducing Data-Reading Programs

Definition: Data-reading commands

There is a group of commands, often referred to as data-reading commands, that you can use in programs to read data from external files in various formats: binary, packed decimal, or text. The data-reading commands are described below.

Function or Command 

Description 

FILEERROR function 

Returns information about the first error that occurred when you are processing a record from an input file with the data-reading commands FILEREAD and FILEVIEW. 

FILENEXT function 

Makes a record available for processing by the FILEVIEW command. It returns YES when it is able to read a record and NO when it reaches the end of the file. 

FILEREAD command 

Reads records from an input file, processes the data, and stores the data in OLAP DML dimensions, composites, relations, and variables, according to descriptions of the fields in the input record. 

FILEVIEW command 

Works in conjunction with the FILENEXT function to read one record at a time of an input file, process the data, and store the data in OLAP DML dimensions and variables according to the descriptions of the fields. 

RECNO function 

Reports the current record number of a file opened for reading. 

Description: File I/O commands

You use the data-reading commands with file I/O commands, such as the commands described below.

Function or Command 

Description 

FILECLOSE command 

Closes an open file. 

FILEGET function 

Returns text from a file that has been opened for reading. 

FILEOPEN function 

Opens a file, assigns it a fileunit number (an arbitrary integer), and returns that number. 

FILEPUT command 

Writes data that is specified in a text expression to a file that is opened in WRITE or APPEND mode. 

FILEQUERY function 

Returns information about one or more files. 

FILESET command 

Sets the paging attributes of a specified fileunit. 

Definition: Data-reading programs

While some of the data-reading commands can be used individually, it is best to place them in a program that is often referred to as a data-reading program. In this way you can minimize mistakes in typing and test your commands on smaller sets of data. A program also allows you to perform operations in which several commands are used together to loop over many records in a file.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback