running command line in DTS package

  • Hi, i have a csv file that i run through an EXE application. i need to be able to run this as part of a DTS execute process task but i cant get the command line to work. can any one please help.

    this is the command line code i use in cmd.exe

    @echo off

    C:

    cd "Program Files\HSCIC\C:\Program Files\HSCIC\HRG4 2013_14 LP Grouper"

    HRGGrouper

    -i ”K:\Reports\HRG_Grouper\ HRG_Grouper_Input.csv”

    -o ”K:\Reports\HRG_Grouper\HRG_Grouper_Output1.csv”

    -d ”C:\Program Files\HSCIC\HRG4 2013_14 LP Grouper\HRG4_sample_NAC.rdf”

    -l ”C:\Program Files\HSCIC\HRG4 2013_14 LP Grouperap_v46lp.tre”

    -h -t -p

    IF %ERRORLEVEL% NEQ 0 echo Error in command, please check hrg.log

    Pause

    Thanks

    James

  • What have you tried so far? What are the errors you encountered?

    I think if you add a "Execute Process Task" to your package, you should be able to get it. You have to remove all extra commands (like "@Echo off", "IF..." and "pause") you have in the batch file. Just enter the executable and enter the arguments.

    Or you can try to call the batchfile itself from the DTS package.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • Thanks.

    i have been enetering the following in my batch file in the Win32Process: field of the execute process task

    C:

    cd "Program Files\HSCIC\#grouperFolderName#"

    HRGGrouper

    –I”K:\Reports\HRG_Grouper\ HRG_Grouper_Input.csv”

    –o” K:\Reports\HRG_Grouper\HRG_Grouper_Output.csv”

    –d” C:\Program Files\HSCIC\HRG4 2013_14 LP Grouper\HRG4_sample_NAC.rdf”

    –l” C:\Program Files\HSCIC\HRG4 2013_14 LP Grouperap_v46lp.tre”

    but i get an error that does not tell you a lot, just that it failed

  • i see my error. i have entered the correct path of the exe but when i execute the process all that happend is that the exe opens. it seems to ignore my parameter values

    J

  • Will it succeed if you enter the drive, path and executable as a single line (i.e. "C:\Program Files\HSCIC\#grouperFolderName#\HRGGrouper.exe") in the executable field and the rest in the arguments field?

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • jamie.lawrence (8/16/2013)


    i see my error. i have entered the correct path of the exe but when i execute the process all that happend is that the exe opens. it seems to ignore my parameter values

    J

    What if you enter both the executable and all arguments as a single line in the executable field?

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • no, it just launches the exe but ignores the input, output ect parameters.

    Thanks for your help

  • First: I am using SQL 2008 and not SQL 2000, so maybe it's not representative.

    Do determine if the combination of the executable and the arguments field work correctly, I have created a new package and added a "Execute Process Task". I've enter "C:\Windows\Notepad.exe" as the executable and entered the filename (incl. full path) of a text file as argument.

    I was able to execute the package (debugging modes) ant it started notepad with the file I entered in the argument field.

    Can you try and see if above scenario succeeds in your situation?

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • Yes, that worked for me.

    i wonder if the fact that i have to press a button in the exe stops it from working automatically

    Thanks again for help

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply