Delete command for InfoSphere DataStage assets

You can use the istool delete command InfoSphere® DataStage® assets.

Prerequisites

To delete InfoSphere DataStage assets, you must have a role that grants you permission to edit assets in the target project.

The preferred way to run this command is in the istool command-line window. If you run this command in your operating system command-line window or in scripts, you must add istool to the command name.

Command syntax

Optional parameters and values in the syntax are enclosed in brackets, [ ].

delete
authentication options
[generic options]
[-abortIfError number_of_errors
[-noprompt]
-datastage ' "dsServer[:port]/project/folder/asset_name.suffix"
  [-base "dsServer[:port]/project/[folder]"]
  '

Command options

authentication parameters
Required. All asset interchange commands use authentication parameters to connect to a specific installation of InfoSphere Information Server.
generic parameters
The generic parameters are available to all asset interchange commands. Use the generic parameters to request help on command syntax, to specify silent or verbose operation, and to use a script to run commands.
-abortIfError | -abort number_of_errors
Stops running the command if errors are encountered.
-noprompt | -np
Suppresses the message confirming that the asset was deleted.
-datastage | -ds ' "dsServer[:port]/project/folder/asset_name.suffix" '
Required. The path name of the InfoSphere DataStage and QualityStage® assets that you want to delete. The syntax of the path name is dsserver/project/folder/name.suffix. When deleting an asset, you must specify the correct suffix for the type of asset that you want to delete. Table 1 lists the supported asset types and their suffixes.
You can use the following option:
-base "dsServer[:port]/project/[folder]"
Use the -base option to specify a base path. This path is then prefixed to all the asset path names that you specify. For example, if your base option specifies dsServer/project, then your asset path specifies only folder/name.suffix. Specify the option within the single quotation marks (' ') that follow the -datastage parameter.

Use the base option to specify a base path name. This path will be prefixed to all the asset paths that you specify. For example, if you specify dsserver/project for the base option, then you specify your asset path asfolder/asset_name.suffix.

Table 1. Include the appropriate suffix for the type of asset that you want to delete.
Asset type Suffix
Parallel job pjb
Sequence job qjb
Server job sjb
Parallel shared container psc
Server shared container ssc
Parameter set pst
Transform tfm
Data element det
Stage type stp
Parallel routine prt
Server routine srt
Table definition tbd
Data connection dcn

Exit status

A return value of 0 indicates successful completion, a value of 1 indicates a warning, and any other value indicates failure. The list of exit codes is shown in the command help. Enter istool> delete -help to see the list of possible exit codes for the delete command.

Example: deleting single assets

The following command deletes a single parallel job named ParallelJob1.pjb.
istool> delete -domain host1 -username xxx -password xxx -datastage 
  'DSServer/Project1/Jobs/ParallelJob1.pjb'

You can run the same command with the -noprompt option to suppress delete confirmation.

istool> delete -domain host1 -username xxx -password xxx -noprompt -datastage 
  'DSServer/Project1/Jobs/ParallelJob1.pjb'

Example: deleting multiple assets

The following command deletes a parallel job named ParallelJob1.pjb, a routine job named ParallelRoutine.prt, and a server routine named ServerRoutine.srt. By using the -base option, you specify the folder names and file names for each asset instead of the full path.
istool> delete -domain host1 -username xxx -password xxx -noprompt 
-datastage 
  '-base=DSServer/Project1
         Jobs/ParallelJob1.pjb 
         Routines/ParallelRoutine.prt 
         Routines/ServerRoutine.srt'
The following command deletes multiple assets that have path names containing blank characters.
istool> delete -domain host1 -username xxx -password xxx -noprompt 
-datastage 
  '-base=DSServer/Project1
         "Jobs/PX Jobs/Job1.pjb"
         "Jobs/PX Jobs/Job2.pjb"'