I have written a batch script to deploy DataStage jobs. The script itself runs on your computer and can push jobs wherever you want. The script is leveraging the DSXImportService that comes with DataStage installation.
The script can:
- Push both parallel and sequence jobs and parameter files.
- Works between projects as well as between environments (for example, dev to prod)
Steps
(1) Export the job into a folder on your computer.
(2) Prepare the authentication file in the same folder where the script is.
(3) Open Windows Command Prompt and run the batch script with the folder path of the exported job as an argument.
script.bat ./Desktop/Exported/
Script
@ECHO off setlocal enabledelayedexpansion set "dir1=%1 FOR /R %dir1% %%X in (*.dsx) DO ( <your installation path>\bin\DSXImportService -ISAuthFile auth_file.txt \ -DSProject <Your Project Name> -DSXFile %%X -Overwrite -Verbose echo %%X )
auth_file.txt
user=<Your DataStage User name> password=Your Password> domain=<DataStage Server URL>:<Port No. Usually 9445> server=<DataStage Server URL>