


The DATALOAD statement can also insert data into LONG columns. The LONG value to be inserted, however, is not stored in the input file specified after INFILE. At the place equivalent to the position of the LONG column, the line of the input file contains a reference to the LONG value in the form of a filename.
In the following example, files with the model name <hotel name>.LNG contain the input data for the LONG column HOTEL.INF. The filenames contain no blanks and can therefore also be written without single quotation marks.
Example:
DATALOAD TABLE hotel
hno 1-2
name 6-14
zip 18-22
address 26-44
info 48-62
INFILE *
/ *
10 | Congress | 20005 | 155 Beechwood Str. | 'CONGRESS.LNG'
30 | Regency | 20037 | 477 17th Avenue | 'REGENCY.LNG'
60 | Airport | 60018 | 650 C Parkway | 'AIRPORT.LNG'
90 | Sunshine | 33575 | 200 Yellowstone Dr. | 'SUNSHINE.LNG'
As each LONG value must be stored in a separate file, this procedure can only be used if not too many LONG values are to be loaded. Therefore, another way to load LONG values has been provided which allows LONG values to be defined as sections of a file by appending a starting and end position to the filename.
Example:
DATALOAD TABLE hotel
hno 1-2
name 4-11
zip 13-17
address 19-37
info 39-63
INFILE *
/ *
10|Congress|20005|155 Beechwood Str. |'HOTEL.LNG' 1-866
30|Regency |20037|477 17th Avenue |'HOTEL.LNG' 867-1026
60|Airport |60018|650 C Parkway |'HOTEL.LNG' 1027-1313
90|Sunshine|33575|200 Yellowstone Dr.|'HOTEL.LNG' 1314-1888
This method allows you to load several LONG values from one file or, for DATAEXTRACT, to extract all LONG values belonging to one column to a single file.
The used position specifications need not be continuous, but each starting position must be greater than the previous end position.
The following restrictions apply to LONG columns:
1. The DATALOAD statement must only refer to one table.
2. FASTLOAD is not supported for LONG columns.
Any other load and file options are available.


