How to get a runable job after a export?
I have a server job exported but it is not runable, i must first compile this job before i can run it!
is there a option when i export the job so that it wil be a runable job so i don't have to compile it?
I am using dsexportcmd.exe to export.
Please advise
How to get a runable job after a export?
Moderators: chulett, rschirm, roy
Re: How to get a runable job after a export?
Hi,asrnl wrote: I am using dsexportcmd.exe to export.
Iam not sure about the syntax and options to specify for dsexportcmd.exe.
But check if you can export 'job executables' and 'program sources' along with the job design.
Also, if any transforms, routines are used in that job, you need to include them too.
DS Experts here can add if I have missed anything.
Here is the syntax we use:
Where %%i is fed from a list of job names. Each is exported to its own dsx file of the same name as the job.
You need to import next. Here is the syntax for importing job.
Here is the syntax for compiling job.
You need to compile the job to make it runnable.
Code: Select all
SET DsBaseDir=C:\Progra~1\Ascential\DataStage7.5.1
SET DsExportCmd=%DsBaseDir%\DsExport.exe
%DsExportCmd% /H=%ExportHost% /U=%ExportUser% /P=%ExportPassword% /JOB=%%i %ExportProject% %%i.dsx >> %LogFileName%
You need to import next. Here is the syntax for importing job.
Code: Select all
SET DsImportCmd=%DsBaseDir%\dsimport.exe
%DsImportCmd% /H=%ImportHost% /U=%ImportUser% /P=%ImportPassword% %ImportProject% %ProjectDir%\%%i.dsx >> %LogFileName%
Code: Select all
SET DsCompileCmd=%DsBaseDir%\dscc.exe
%DsCompileCmd% /h %ImportHost% /u %ImportUser% /p %ImportPassword% %ImportProject% /j %%i /f >> %LogFileName%
Mamu Kim
KDuke Thanks for youre reply, but it's still not working.
I have the following syntax:
for /F "tokens=1" %%i in (%DsxList%) do (
ECHO Importing %%i to Project: %Project% on Host: %Host%
echo %DSImportCmd% /H=%Host% /U=%User% /P=%Password% %Project% %ProjectDir%\%%i >> %LogFileName%
%DSImportCmd% /H=%Host% /U=%User% /P=%Password% %Project% %ProjectDir%\%%i >> %LogFileName%
%DsCompileCmd% /H=%Host% /U=%User% /P=%Password% %Project% %ProjectDir% /j * /f >> %LogFileName%
IF NOT %ERRORLEVEL%==0 GOTO ProjFail
ECHO. >> %LogFileName%
ECHO *** Completed Import for Project: %Project% on Host: %Host% >> %LogFileName%
ECHO from File: %ProjectDir%\%%i >> %LogFileName%
ECHO. >> %LogFileName%
)
GOTO EXITPT
As you can see i am using youre DataStageImport.bat script iam getting the following error:
C:\Progra~1\Ascential\DataStage\dsimport.exe /H=servername /U=login /P=password projectname Z:\Afdeling\Rollen\Temp\Project\\GetMIJobLog.dsx
Unrecognized argument '/H=servername'.
Usage: dscc [@argfile] [/?] /h <value> [/o] [/u <value>] [/p <value>] <project> [/j <value>] [/r <value>] [/f] [/ouc] [/rd <value>] [/rt <value>] [/mful <value>] [/mfcgb <value>]
Do i have to make a seperate script to compile? Or can i put it in the import script?
I have the following syntax:
for /F "tokens=1" %%i in (%DsxList%) do (
ECHO Importing %%i to Project: %Project% on Host: %Host%
echo %DSImportCmd% /H=%Host% /U=%User% /P=%Password% %Project% %ProjectDir%\%%i >> %LogFileName%
%DSImportCmd% /H=%Host% /U=%User% /P=%Password% %Project% %ProjectDir%\%%i >> %LogFileName%
%DsCompileCmd% /H=%Host% /U=%User% /P=%Password% %Project% %ProjectDir% /j * /f >> %LogFileName%
IF NOT %ERRORLEVEL%==0 GOTO ProjFail
ECHO. >> %LogFileName%
ECHO *** Completed Import for Project: %Project% on Host: %Host% >> %LogFileName%
ECHO from File: %ProjectDir%\%%i >> %LogFileName%
ECHO. >> %LogFileName%
)
GOTO EXITPT
As you can see i am using youre DataStageImport.bat script iam getting the following error:
C:\Progra~1\Ascential\DataStage\dsimport.exe /H=servername /U=login /P=password projectname Z:\Afdeling\Rollen\Temp\Project\\GetMIJobLog.dsx
Unrecognized argument '/H=servername'.
Usage: dscc [@argfile] [/?] /h <value> [/o] [/u <value>] [/p <value>] <project> [/j <value>] [/r <value>] [/f] [/ouc] [/rd <value>] [/rt <value>] [/mful <value>] [/mfcgb <value>]
Do i have to make a seperate script to compile? Or can i put it in the import script?
kduke wrote:Here is the syntax we use:
Where %%i is fed from a list of job names. Each is exported to its own dsx file of the same name as the job.Code: Select all
SET DsBaseDir=C:\Progra~1\Ascential\DataStage7.5.1 SET DsExportCmd=%DsBaseDir%\DsExport.exe %DsExportCmd% /H=%ExportHost% /U=%ExportUser% /P=%ExportPassword% /JOB=%%i %ExportProject% %%i.dsx >> %LogFileName%
You need to import next. Here is the syntax for importing job.
Here is the syntax for compiling job.Code: Select all
SET DsImportCmd=%DsBaseDir%\dsimport.exe %DsImportCmd% /H=%ImportHost% /U=%ImportUser% /P=%ImportPassword% %ImportProject% %ProjectDir%\%%i.dsx >> %LogFileName%
You need to compile the job to make it runnable.Code: Select all
SET DsCompileCmd=%DsBaseDir%\dscc.exe %DsCompileCmd% /h %ImportHost% /u %ImportUser% /p %ImportPassword% %ImportProject% /j %%i /f >> %LogFileName%