Hi
We are planning to have a process in place where we can use Rational Build Forge Tool which invoke a script which would export and import DSX into Datastage 8.1. what are the ds commands which are specific to 8.1 which can be used at the server side other than ISTOOLS.
Thanks
Srikanth Punuru
Datastage Code Export Important
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 40
- Joined: Thu Jul 10, 2008 12:45 pm
Datastage Code Export Important
Srikanth Reddy
Integration Consultant
Integration Consultant
I took the scripts I used to backup a project and modified them to migrate jobs. I create a list of jobs called JobList.txt. Then I edit a bat file which sets up my from and to project names and user names. Then I run the script.
The commands are these:
The ones commented out work better for whole projects and not individual jobs.
Code: Select all
for /F "tokens=1" %%i in (%JobList%) do (
%DsExportCmd% /H=%ExportHost% /U=%ExportUser% /P=%ExportPassword% /JOB=%%i %ExportProject% %%i.dsx >> %LogFileName%
%DsImportCmd% /H=%ImportHost% /U=%ImportUser% /P=%ImportPassword% %ImportProject% %ProjectDir%\%%i.dsx >> %LogFileName%
%DsCompileCmd% /h %ImportHost% /u %ImportUser% /p %ImportPassword% %ImportProject% /j %%i /f >> %LogFileName%
osql -S %ETL_MIGRATION_HOST% -U %ETL_MIGRATION_USER% -P %ETL_MIGRATION_PWD% -i %SqlFile%
)
Code: Select all
SET DsBaseDir=C:\Progra~1\Ascential\DataStage7.5.1
SET DsExportCmd=%DsBaseDir%\DsExport.exe
:: SET DsExportCmd=%DsBaseDir%\dscmdexport.exe
SET DsJobCmd=%DsBaseDir%\dsjob.exe
:: SET DsImportCmd=%DsBaseDir%\dscmdimport.exe
SET DsImportCmd=%DsBaseDir%\dsimport.exe
SET DsCompileCmd=%DsBaseDir%\dscc.exe
SET DsDesignerCmd=%DsBaseDir%\dsdesign.exe
Mamu Kim
I build I SQL statement which does an insert into table so we can track what jobs got migrated when. There are actually 2 tables one with job names and another with start and end times for the whole migration. We could easily track how much time it took the admins to migrate jobs. We had a nice audit trail too.
This use osql the SQL Server command line tool. I will have an Oracle version soon. Maybe I will post the code to others can benefit. The changes are real simple to the original DataStageBackup.bat file posted on my tips page. I think anyone can do it from what I posted above.
This use osql the SQL Server command line tool. I will have an Oracle version soon. Maybe I will post the code to others can benefit. The changes are real simple to the original DataStageBackup.bat file posted on my tips page. I think anyone can do it from what I posted above.
Mamu Kim