Page 1 of 1

Compilation through dscc

Posted: Wed Aug 04, 2010 11:57 pm
by tkbharani
Hi

I am compiling DataStage Jobs and Folder through dscc command, through a batch file. My DataStage Folder name contains space in between names. For example, one of the folder name is "00 Sequence". When there is a space in names, dscc command fails. Can any of you suggest me how to use the command when there is a space. Following is the command

Code: Select all

"C:\PF\IBM\IS\Clients\Classic\"dscc /h HOSTNAME /u USERNAME /p PASS DS_PROJECT /f /j \Jobs\TEST\00 SAMPLE\* /rd F:\Batch1.txt /rt T

Posted: Thu Aug 05, 2010 1:50 am
by arvind_ds
Try using double quotes for your directory location path.

eg

"\Jobs\TEST\00 SAMPLE\*"

Posted: Thu Aug 05, 2010 2:25 am
by tkbharani
hi

I tried using "", but it did not work. I also, tried some escape charecters and many options, but still I could not get the right way to crack it :?

Posted: Thu Aug 05, 2010 5:13 am
by chulett
Double-quotes are the right answer, that or the 8.3 original short name that's still there. Try "\Jobs\TEST\00 SAMPLE\"* instead, that or \Jobs\TEST\00SAMP~1\* as a guess. Note the number at the end may be different depending on 'duplicates'.

Posted: Sat Sep 26, 2015 7:21 am
by bcormier7
You were close but the last double quote goes before the \* like this "\Jobs\TEST\00 SAMPLE"\* ... :D

Cheers!!

Posted: Sat Sep 26, 2015 7:33 am
by chulett
8)

Posted: Sun Sep 27, 2015 10:49 am
by kduke
I don't think you can compile a whole folder like that. You need to compile one job at a time. All you need is the job name.

I also think you are quoting the command wrong.

Code: Select all

"C:\PF\IBM\IS\Clients\Classic\dscc.exe"
or leave them off because the is no space in the command path.

Code: Select all

C:\PF\IBM\IS\Clients\Classic\dscc.exe

Posted: Sun Sep 27, 2015 11:02 am
by kduke
Here is my code from my batch file.

Code: Select all

SET DsBaseDir=C:\Progra~1\Ascential\DataStage7.5.1
SET DsCompileCmd=%DsBaseDir%\dscc.exe

%DsCompileCmd% /h %ImportHost% /u %ImportUser% /p %ImportPassword% %ImportProject% /j %%i /f >> %LogFileName%
This is obviously older version of DataStage but all you need to do is add the domain info. The compile command is in a loop where it is exporting one job at a time and importing it then compiling it. So "%%i" is fed from that loop. You can easily build a list of jobs with dsjob command but not based on a folder. The folder name is not easily obtained.

Code: Select all

    for /F "tokens=1" %%i in (%JobList%) do (

    )