Entering content frame

 All LONG Values to Be Inserted in One LONG Data Stream 

All LONG values to be inserted into a column are in one data stream.

Variant 1

In the data stream, you specify the name of the data stream containing the LONG values with the start and end position of the LONG value to be loaded, instead of a column value.

DATALOAD TABLE sqltravel10.hotel
   hno      1
   name     2
   info     3
INFILE 'hotel.data'

Content of the data stream:

10,Excelsior,'HOTEL.LNG' 1-880
30,Flora,'HOTEL.LNG' 881-1046
60,Bellevue,'HOTEL.LNG' 1047-1360

Variant 2

You specify the name of the data stream that contains the LONG values after the keyword LONGFILE. In the data stream itself, specify only the position specifications without a preceding data stream name.

DATALOAD TABLE sqltravel10.hotel
   hno     1
   name    2
   info    3
INFILE 'hotel.data'
LONGFILE info 'HOTEL.LNG'

Content of the data stream:

10,Excelsior,1-880
30,Flora,881-1046
60,Bellevue,1047-1360

Specifying a Code Attribute for the Media Specified with LONGFILE

In the load command, you can optionally specify a code attribute for data streams specified with LONGFILE.

Code Attribute for a Data Stream LONG Values

Specifying the Code Attribute ASCII

DATALOAD TABLE sqltravel10.hotel
   hno      1
   name     2
   info     3
INFILE 'hotel.data'
LONGFILE info 'HOTEL.LNG' ASCII

Content of the data stream:

10,Excelsior,1-880
30,Flora,881-1046
60,Bellevue,1047-1360

See also:

Loading LONG Values

Each LONG Value to Be Inserted in a Separate LONG Data Stream

Leaving content frame