Entering content frame

Syntax documentation Position Description Locate the document in the library structure

You use the syntax rule field_pos to describe:

·        The position of the input field in the data stream when importing application data

·        The position of an output field in the data stream when exporting application data

·        The position of a comparison value for importing application data selectively (Selecting Data Records).

Syntax

<field_pos> ::= <valSTART_POS> | <valSTART_POS> - <valEND_POS>

valSTART_POS

Start position of a data field

valEND_POS

End position of a data field

Explanation

The position description depends on the format.

Format FORMATTED

If the data stream has the FORMATTED format, enter only absolute start and end positions for the data fields in the data stream.

Example

The data stream customer.data has the FORMATTED format. The data fields have a standard format and end with a line break.

Position No.

1 2 3 4 5 6 7 8 9 ....

 

- 3 0 0 0 M r s - - - - J e n n y - - - - - P o r t e r
- 3 1 0 0 M r - - - - - P e t e r - - - - - B r o w n -
- 3 2 0 0 C o m p a n y ? - - - - - - - - - D a t a s o

IMPORT command

IMPORT TABLE hotel.customer
DATA INSTREAM FILE 'customer.data'
FORMATTED
  cno       
01-05
  title     
06-12
  firstname 
13-22
  name      
23-32
  zip       
33-37
  address   
38-62
PAGE WITH 80% USAGE

Format COMPRESSED

If the data stream has the COMPRESSED format, enter only relative positions for the data fields in the data stream.

Example

The data stream customer.data has the COMPRESSED format. The data fields do not have a uniform format but are separated by commas and end with a line break.

Position No.

   1    2       3    4       ....

 

"3000","Mrs","Jenny","Porter",...
"3100","Mr","Peter","Brown",...
"3200","Company","?","Datasoft",...

IMPORT command

IMPORT TABLE hotel.customer
DATA INSTREAM FILE 'customer.data'

  cno       1
  title     2
  firstname 3
  name      4
  zip       5
  address   6
PAGE WITH 80% USAGE

COMPRESSED is the default used by the Loader.

Format FORMATTED BINARY

Example

The data stream customer.data has the FORMATTED BINARY format.

The data fields have a standard format but do not end with a line break.

IMPORT command

IMPORT TABLE hotel.customer
DATA INSTREAM FILE 'customer.data'
FORMATTED BINARY
  cno       
01-05
  title     
06-12
  firstname 
13-22
  name      
23-32
  zip       
33-37
  address   
38-62
PAGE WITH 80% USAGE

 

Leaving content frame