table-clob.p
1 |
define temp-table tt no-undo |
---|---|
2 |
field fd1 as integer |
3 |
field fd2 as char |
4 |
field lob as clob. |
5 |
|
6 |
create tt. |
7 |
assign tt.fd1 = 2 |
8 |
tt.fd2 = "With clob" |
9 |
tt.lob = "test clob". |
10 |
|
11 |
define variable cTempPath as character no-undo. |
12 |
assign cTempPath = session:temp-directory |
13 |
cTempPath = cTempPath + "export/". |
14 |
|
15 |
file-info:file-name = cTempPath. |
16 |
os-create-dir value (cTempPath). |
17 |
|
18 |
cTempPath = cTempPath + "clob/". |
19 |
os-delete value(cTempPath) RECURSIVE. |
20 |
file-info:file-name = cTempPath. |
21 |
os-create-dir value (cTempPath). |
22 |
|
23 |
define stream sdata. |
24 |
output stream sdata to value(cTempPath + "tt.d":U) no-map no-convert. |
25 |
for each tt: |
26 |
export stream sdata tt. |
27 |
end. |
28 |
output stream sdata close. |