(Contents)(Previous)(Next)

Using Files

Some commands within the ADABAS tools have a filename as an argument. This filename always refers to a file in the UNIX file system, i.e., to a regular file or a device (e.g., a tape device).

Examples:

put customer.data

get parker/customer.data

export customer /dev/rmt0 -32

1) Files in the File System:

The filename must comply with the UNIX conventions. Upper- and lowercases must therefore be distinguished. They will not be converted.

Examples of UNIX filenames:

1. customer.form

2. parker/customer.form

3. /u/parker/customer.form

4. ${HOME}/customer.form

5. /dev/rmt0

The UNIX filename is specified either as a simple filename (example 1), or as a relative path name, i.e., starting with one or more directory names that are separated from each other and from the simple filename by a '/' (example 2), or as an absolute path name starting with the root directory '/' (example 3).

For simple filenames, the current working directory will be scanned. For relative path names, the specified directories will be searched, starting with the current working directory.

Each simple filename or directory name may have up to 14 characters. A name must neither contain a '/' nor begin with a '-'. The total length of a UNIX filename must not exceed 64 characters.

Environment variables of the UNIX environment can be used within filenames (example 4). When doing so, the variable names must be enclosed in curly braces.

Successful file accesses require that the user has the necessary UNIX privileges for reading and writing files or directories.

Files with variable record lengths to be read by the end user tools must contain end-of-line characters. Files with fixed record lengths must contain the corresponding length as a 4 byte integer in the first record of the file.

2) Tape Files:

When reading from or writing to tape, a blocking factor of 4, 16, or 32 KBytes can be specified if the tape device permits such a specification. The default value is 4 KBytes. Larger values must be passed as parameters (see example 4).

3) STDIO

The UNIX-specific standard input/output can also be used, e.g.;

- when 'STDOUT' is used as the output filename:

Using the command

select * from test

REPORT

put STDOUT

stored in QUERY with the name 'OUT', e.g., the result of a request can be written directly to the file 'outfile':

xquery ... -B out > outfile

- within a shell script:

xload -b STDIN << +

create table test

...

+

- using a pipe served from a program or by running a file:

cat file | xload -b STDIN


(Contents)(Previous)(Next)