Try OpenEdge Now
skip to main content
ABL Data Types Addenda
Using large objects in ABL : Dumping and loading large objects : Loading large objects
 

Loading large objects

When you use IMPORT to load large object data into a database or temp-table, you use the INPUT FROM statement to read .blb files and place the file's contents in the BLOB or CLOB fields. You use the optional LOB-DIRdir-name phrase on the INPUT FROM statement to specify where the.blb files are located. If you do not specify LOB-DIR, IMPORT loads BLOB and CLOB values from the same directory as the INPUT file. When you import a .blb file into a CLOB, the filename must contain the code page name.
During the IMPORT, the AVM interprets the data in the LOB field position in the input file to be the filename for that record's LOB data. In the following example, the input file is called customer.d and the LOB field .blb files are located in C:\DumpedData\custblob:
INPUT FROM D:\DumpedData\customer.d LOB-DIR "custblob".
REPEAT:
CREATE customer:
IMPORT customer.
END.
INPUT CLOSE.
When importing LONGCHAR values:
*Only one LONGCHAR variable can be imported per command
*Code page information must be placed at the beginning of the file
*You can only import files with names that contain code page information