project BLF > class BDocumentLink > method DumpDocument
Description
Dump a stored document out to the file system.
Parameters
iiDocumentLink_ID | input | integer | identifier of the document |
icFileName | input | character | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program1/bdocumentlink.p)
<M-1 run DataLoad (input '' (icRowids),
input string(iiDocumentLink_ID) (icPkeys),
input '' (icObjectIds),
input '' (icFreeform),
input no (ilKeepPrevious),
output viFcReturnSuper (oiReturnStatus)) in BDocumentLink>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.
for each tDocumentStorage where
tDocumentStorage.DocumentLink_ID = iiDocumentLink_ID
by tDocumentStorage.DocumentStorageSegmentNr:
vpDocument = vpDocument + tDocumentStorage.DocumentStorageString.
end.
vmDocument = BASE64-DECODE(vpDocument).
COPY-LOB FROM vmDocument TO FILE icFileName.
finally:
set-size (vmDocument) = 0.
end finally.