Entering content frame

Background documentation Data Stream Locate the document in its SAP Library structure

The Loader transforms metadata of the database catalog, application data, and pages of a database instance into metadata and application data (data definitions, data records, and data fields), and pages and conversely, in a format that the Loader can read. The data is unloaded into data streams, or loaded from these streams.

A range of syntax elements are available for describing the data stream. These syntax elements can be used in the load and upload commands.

Syntax

<catalog_outstream_spec> ::= CATALOG <outstream_spec>
<catalog_instream_spec> ::= CATALOG <instream_spec>
<configuration_instream_spec> ::= CONFIGURATION <instream_spec>
<data_outstream_spec> ::= DATA <outstream_spec>
<data_instream_spec> ::= DATA <instream_spec>
<package_outstream_spec> ::= PACKAGE <outstream_spec>

<outstream_spec> ::= OUTSTREAM [<mediumtype_spec>] '<valSTREAM_NAME>' [<stream_format_spec>] [<stream_extract>] [APPEND]

<instream_spec> ::= INSTREAM [<mediumtype_spec>] '<valSTREAM_NAME>' [<stream_format_spec>] [<stream_extract>] [noheader_spec]

<stream_extract> ::= START <valSTART_POS>
| START <valSTART_POS> <valEND_POS>
| START <valSTART_BLOCK> : <valSTART_POS> <valEND_BLOCK> : <valEND_POS>

<noheader_spec> ::= NOHEADER <valRECORD_LENGTH>

<part_spec> ::= TABLE <table_name> | USER | ALL

valSTREAM_NAME

Name and path of the medium, in a DATAEXTRACT command, also the name of the command file to be generated

APPEND

An existing medium is not overwritten. This means that data or generated load statements are added to the end of the medium.

Caution

This does not apply to TABLEEXTRACT commands. A TABLEEXTRACT command overwrites an existing medium.

valSTART_POS

Number of the first data record to be loaded

valEND_POS

Number of the last data record to be loaded

valSTART_BLOCK

Block number of the first data record to be loaded

valEND_BLOCK

Block number of the last data record to be loaded

valSTREAM_NAME

Name and path of the medium

valRECORD_LENGTH

Length of an individual data record in the data stream

TABLE

A single table is unloaded to a data stream or loaded from a data stream.
Prerequisite: the user must be the owner of this table

USER

The tables of the user currently logged on to the Loader are unloaded to one or more data streams, or the tables unloaded with the corresponding commands are restored from these data streams. The user who restores the tables does not need to be the same user who unloaded them.

If you are loading tables that were unloaded by the user mona, the tables can be reloaded by the user david.

ALL

All tables of the database catalog are unloaded to one or more data streams, or are loaded from these data streams.
Prerequisite: the user must be the Database System Administrator.

Explanation

Every data stream is identified using the following data:

·        Metadata and/or Application Data
Data that is to be loaded or unloaded.
The keywords
CATALOG, DATA, CONFIGURATION, and PACKAGE distinguish the type of data: Metadata or Application Data.

·        Direction
You enter the keyword OUTSTREAM to specify that the data is to be unloaded from a MaxDB database instance to a data stream. You use the syntax rule
outstream_spec to describe the data stream.
You enter the keyword INSTREAM to specify that the data is to be loaded from a data stream to a MaxDB database instance. You use the syntax rule
instream_spec to describe the data stream.

·        Medium
The data is loaded from the specified medium or to the medium. You use the syntax rule
mediumtype_spec to describe the medium. If no medium is specified, a file (FILE) is selected as the medium.

·        Data format
The formats specified in the syntax rule 
stream_format_spec apply for the data. 

Additional Syntax Elements

<stream_extract>

The syntax rule stream_extract is only evaluated for the FASTLOAD command and the DATALOAD command. If you use this rule in other commands, it is ignored.

You can use stream_extract to specify that only certain parts of a data stream are to be loaded.

<noheader_spec>

The syntax rule noheader_spec is only evaluated for FASTLOAD and DATALOAD commands. If you use this rule in other commands, it is ignored.

For data streams with binary values (FORMATTED BINARY), you can use noheader_spec to specify that the corresponding medium does not have a special header containing the sizes of a data record. At the same time, you specify the length of an individual data record in the data stream.

If the data stream was generated with the DATAEXTRACT command, it contains a special header with the length of an individual data record in the data stream.

If this header is missing, the Loader can use noheader_spec to specify the length of an individual data record. If this rule is missing, the Loader calculates the length of an individual data record using the information on the column positions in the load command.

<part_spec>

You use the syntax rule part_spec to specify whether an individual table, the tables of the user logged on, or all the tables in the database catalog are loaded or unloaded. This syntax rule is used in the following commands: TABLEEXTRACT, TABLELOAD, CATALOGEXTRACT, or CATALOGLOAD.

 

Leaving content frame