swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
function  

dctm.execute

 
 

Library: Interfaces, Documentum interface (OMDOCUMENTUM)
Import: omdocumentum.xmd

Declaration

  export external function execute
       value string command

Argument definitions

command
A string representation of the Documentum Content Server API command to be executed, along with its arguments.


Purpose

You can use the dctm.execute function to execute a Documentum Content Server API command. This function corresponds to the Documentum Client Library (DMCL) function dmAPIExec. The applicable commands are documented in the Documentum Content Server API Reference Guide.

Example

This example connects to a docbase, creates a cabinet and a folder, and links the folder to the cabinet.

  import "omdocumentum.xmd" prefixed by dctm.

  process
     local stream docbase      initial {"sample-docbase"}
     local stream user         initial {"sample-user"}
     local stream password     initial {"sample-password"}
     local stream session
     local stream cabinet
     local stream folder

     set session to dctm.result of
        "connect,%g(docbase),%g(user),%g(password)"

     do when session = ""
        output  "Error connecting to the docbase%n"
        output  "Error returned: "
          || dctm.result of "getmessage,current"
          || "%n"
        halt
     else
        output "Connected%n"
     done

     ;Create a cabinet
     set cabinet to dctm.result of "create,%g(session),dm_cabinet"
     output "Cabinet asset id is: " || cabinet || "%n"

     ;Cabinet name is cabinet-01
     dctm.set "set,%g(session),%g(cabinet),object_name" to "cabinet-01"

     ;Commit cabinet
     dctm.execute "save,%g(session),%g(cabinet)"

     ;Create a folder
    set folder to dctm.result of "create,%g(session),dm_folder"
    output "folder asset id is: " || folder || "%n"

     ;Folder name is folder-01
    dctm.set "set,%g(session),%g(folder),object_name" to "folder-01"

    ;Link folder into cabinet
    dctm.execute "save,%g(session),%g(folder),cabinet-01"

    ;Commit new cabinet
    dctm.execute "save,%g(session),%g(folder)"

Exceptions

The following exceptions can occur when calling this function.

        Other Library Functions
   dcmt.writer
   dctm.execute
   dctm.omdocumentum-version
   dctm.reader
   dctm.result
   dctm.set
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:45:08 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.