0% found this document useful (0 votes)
101 views

Comandos iDQL y iAPI

This document discusses some lesser known commands for the iAPI32 and iDQL32 Documentum command line clients. It describes the ? command which allows running DQL queries and retrieving results directly from iAPI32. It also covers the @ command to run API scripts from iAPI32 without restarting, and the describe command to view object and table attributes. Additionally, it mentions the shutdown command to immediately shutdown the Documentum content server.

Uploaded by

yopeib
Copyright
© © All Rights Reserved
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views

Comandos iDQL y iAPI

This document discusses some lesser known commands for the iAPI32 and iDQL32 Documentum command line clients. It describes the ? command which allows running DQL queries and retrieving results directly from iAPI32. It also covers the @ command to run API scripts from iAPI32 without restarting, and the describe command to view object and table attributes. Additionally, it mentions the shutdown command to immediately shutdown the Documentum content server.

Uploaded by

yopeib
Copyright
© © All Rights Reserved
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 3

Some Not-So-Obvious iDQL and

iAPI Commands
April 3, 2011 1 Comment
I am willing to wager you are already familiar with the iAPI32* and iDQL32 command line clients
for Documentum.  (If not, these clients allow you to run API commands and DQL queries from the
operating system command line.  They can be found on the Content Server at %DM_HOME%\bin.)
But did you know there are a few not-so-obvious commands that these clients posses that make
them easier to use?

iAPI32
?
You can run DQL queries and retrieve query results directly from the iAPI32 interface by using the
‘?’ command. The ? command allows you to enter a DQL SELECT statement in iAPI32 and returns
the results immediately, just like iDQL32.  This is a very handy if you are working in iAPI32 and
need to run a quick query.
API>?,c,select r_object_id, object_name from dm_document
where folder('/Temp');

----------------  -------------------------------------
090000018000151b  Room Upgrade Fri Oct 16 14:28:27 PDT
0900000180001d05  TargetSetup.Result
0900000180007941  VD Root
0900000180008d0d  test 3
090000018000d9dd  TargetSetup.Result
0900000180011900  xPlore_1.0_Deployment_Guide.pdf
etc...

The ? command also allows you to retrieve a collection (query result) formatted as a table instead of
using the next() method to retrieve the rows one at a time.  For example:
API>readquery,c,select r_object_id, object_name from
dm_document where folder('/Temp')
API>q0
API>?,c,q0
r_object_id       object_name
---------------- 
-----------------------------------------
090000018000151b  Room Upgrade Fri Oct 16 14:28:27 PDT
2009
0900000180001d05  TargetSetup.Result
0900000180007941  VD Root
0900000180008d0d  test 3
090000018000d9dd  TargetSetup.Result
0900000180011900  xPlore_1.0_Deployment_Guide.pdf
etc...
@
The @ command allows you to run an API script from the API> prompt.  Usually to run an API
script, you specify it on the command line when starting iAPI32 by using the -r argument. 
However, if you are already in iAPI32 and want to run a script, you can use the @ command to load
and run it, saving you from having to exit and restart iAPI32.
API> @c:\temp\test.api
1 API> create,c,dm_document
1 090000018001c901 1
1 API> set,c,l,object_name
1 SET> test doc
1 OK 1
1 API> link,c,l,/Temp
1 OK 1
1 API> setfile,c,l,c:\temp\test.api,crtext
1 OK 1
1 API> save,c,l
1 OK 1
API>

Describe
The describe command allows you to retrieve the column names, types and sizes for object types
and registered tables in the repository (i.e., describe them). This command can be really handy
when you are trying to construct a query but are unsure of attribute names.
API>describe,c,type,dm_document
Type Name:    dm_document
SuperType Name:    dm_sysobject
Attributes:        86
object_name                      CHAR(255)
r_object_type                    CHAR(32)
title                            CHAR(400)
subje                            CHAR(192)
autho                            CHAR(48)    REPEATING
keywds                           CHAR(48)    REPEATING
etc...

The ? and describe commands work in both iAPI32 and the Webtop API Tester, the @ command
only works in iAPI32.

iDQL32
The describe command works in iDQL32 too, but not in the DQL Editor of DA.
DQL>describe table dm_queue

Table Name:     dbo.dm_queue


Columns:        36
stamp                            CHAR(16)
stamp_i                          CHAR(16)
name                             CHAR(32)
sent_by                          CHAR(32)
date_sent                        TIME
event                            CHAR(64)
etc...

@
The @ command works in iDQL32 similarly to how it works in iAPI32.  It allows you to load and
run a “script file” containing DQL commands.  The @ command does not work in the DA DQL
Editor.
DQL>@c:\temp\test.dql
r_object_id       object_name
---------------- 
-----------------------------------------
090000018000151b  Room Upgrade Fri Oct 16 14:28:27 PDT
2009
0900000180001d05  TargetSetup.Result
0900000180007941  VD Root
0900000180008d0d  test 3
090000018000d9dd  TargetSetup.Result
0900000180011900  xPlore_1.0_Deployment_Guide.pdf
etc...

Shutdown
The shutdown command will shutdown the content server immediately (only if you are superuser,
of course).  It provides no feedback, and is the same as shutting down the Docbase from Server
Manager or the Windows Services control panel.
DQL>shutdown

The shutdown command works in both iDQL32 and the Webtop DQL Editor.

*Note, the use of iAPI32 is deprecated as of D6.

You might also like