DRS

MAY Computer

Help

SPLITDRDFILE

Applies to  

DRS (Module: wmDRS.dll)

Group  

DRD

See also  

Although it is possible to write more than one DRD block to a DRD file it is recommended to create single DRD files (at least before processing them against the DMS) with only one DRD block in each file. The reason for this is that if processing against DMS fails due to network or other problems it is easier to continue processing where the first error occured. Otherwise it is necessary to process the complete DRD file again. This issue is usually not critical for Export or other operations which do only read and extract information from the DMS. But especially for Imports and also (depending on actual operation details) for Updates it can lead to unwanted and errorous effects processing the same DRD again that already has been performed successfully before.

However, there might be processes creating one big DRD file containing multiple DRD blocks. This method is used to split such files into single DRD files - one for each document.

 

Syntax

SPLITDRDFILE <VariableName>, <DRDFile>[, <DestinationStructure>][, <DeleteOrigDRDFile>][, <MoveComponents2Dst>][, <DRDName>]

Part

Description

<VariableName> Script variable to store operation result in.
<DRDFile> Source DRD file to be splitted.
<DestinationStructure>

Destination folder and filename structure for the single DRD files. If missing default path is same path where the source DRD file resides and filename structure is "%STANDARDID%.drd". In general all DRD variables and common variables can be used that are available in DRS. But keep in mind that usually the common %-variables are resolved immediately before passing the string as parameter to the function. The main important for this method are:
    %STANDARDID% ... Something like a unique counter
    %NOWyyymmddhhnnss% ... Current date (use with %counter%)
    %COUNTER% ... a counter
    %DOCID% ... Document id (works only if DRD blocks contain it)

To prevent from too early variable resolving you can work around this by writing %GETSTR.CHR(37)% for %.

<DeleteOrigDRDFile>

0|1; Optional flag if original DRD file should be deleted after split operation. Default is 0.

<MoveComponents2Dst>

0|1; Optional flag if component files contained in the DRD blocks should be moved also to the new location. Default is 0.

<DRDName> DRD key.