DataStage command-line tools

CPDCTL and the dsjob tool are command-line interfaces (CLI) you can use to manage your DataStage® resources in IBM Cloud Pak® for Data.

Use the command-line tools to reuse any DataStage scripts that exist on your system.
You can use the following command-line tools to run DataStage tasks:
  • CPDCTL: cpdctl dsjob or cpdctl datastage

The documentation for the cpdctl dsjob command-line tool, including the full list of commands, can be found at the dsjob README.

Resources

For installation, configuration, available commands, supported outputs, and usage scenarios, refer to IBM Cloud Pak for Data Command Line Interface.

For more information on the CPDCTL command, see IBM Cloud Pak for Data Command Line Interface.

For detailed information about installing, configuring, and using the DataStage jobs command-line interface, see Installation.

To create a profile and enable dsjob use the following scripts.

For IBM Cloud Pak for Data:
#!/bin/bash
export DSJOB_URL=<CP4D CLUSTER URL>
export CPDCTL_ENABLE_DSJOB=true
export DSJOB_USER=<USER>
export DSJOB_PWD=<PASSWD>


cpdctl config user set CP4D-user --username $DSJOB_USER --password $DSJOB_PWD
cpdctl config profile set CP4D-profile --url $DSJOB_URL --user CP4D-user
cpdctl config profile use CP4D-profile
If you have multiple profiles, you can run a command against a specific profile with either cpdctl project list --profile <PROFILE> or CPD_PROFILE=<PROFILE> cpdctl project list. For example, to run multiple commands in a profile without changing your default profile, you can run the following commands.
export CPD_PROFILE=<PROFILE-1>
cpdctl project list
cpdctl ....
export CPD_PROFILE=<PROFILE-2>
cpdctl project list
cpdctl ....
unset CPD_PROFILE <go back to default profile>