Previous Topic: pdm_task--Set Environment Variables

Next Topic: Input Examples

pdm_text_cmd--Text API Command Line Interface

Use the pdm_text_cmd command for the Text API, which you can use to create and update various objects such as requests, change orders, issues, assets, and contacts.

Important! You cannot use a single or double quote as the parameter of the pdm_text_nxd or bop_cmd commands.

Syntax

This command has the following format:

pdm_text_cmd -t table {-u from_userid -p from_persid} [-o operation] [-f input file] [-T timeout] [-h]

-t table

(Required) Specifies the table to process. The table name can be one of the following values (not case sensitive):

Note: See the [OPTIONS] section of the text_api.cfg file for a complete list of valid table names.

-u from_userid | -p from_persid

(One option required) Identifies the contact for this operation:

-u from_userid

Identifies the contact using the User ID value.

-p from_persid

Identifies the contact using the unique object identifier for the contact record. from_persid must be of the form cnt:xxxx. xxxx is the persistent ID of the object.

Note: The value that you specify with this option is appended to the end of the input for the pdm_text_cmd command using the appropriate keyword, %FROM_USERID or %FROM_PERSID.

-o operation

Specifies the operation to perform. The operation must be one of the following values (not case sensitive):

Both UPDATE and UPDATE_ONLY require the %SEARCH keyword in the command input. You can perform only one operation transaction with each invocation of pdm_text_cmd.

-f input_file

Specifies the full path of the file to process, which is a text file containing valid Text API commands. If you omit this parameter, commands are used from STDIN. The Text API uses the following basic format for input:

%keyword=value

You can issue multiple commands within the input by separating the command request by at least five percent signs (%%%%%).

Note: For more information about valid keywords and about formatting input to the Text API, see the file text_api.cfg.

-T timeout

Specifies the number of seconds to wait for a response from the server before timing out. The default is 30 seconds.

Note: pdm_text_cmd shows the text-based replies received back from the Text API, which include success or error messages, and the original text sent using the API for processing. pdm_text_cmd returns zero if the command completes successfully without warnings or errors or one if the command completes successfully, but with warnings. Any other return value indicates that an error occurred.

Important! On UNIX, the LIBPATH must be set before running several CA SDM utilities. Use pdm_task to set the LIBPATH before running a utility. For example, input "pdm_task pdm_clean_attachments ...".

Note: When passing the parameters from command prompt, use Ctrl+Z in Windows and Ctrl+D in POSIX.

(new related group 1)

Using the Text API