Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS packages

Status
Not open for further replies.

cobbmj

MIS
Feb 18, 2003
4
FI
I am trying to create a single error.bat file for my dts package whereby the single error.bat holds different descriptions.

So if process 1 - Get files fails the error "Get Files failed" is produced in a cmd window
if process 8 fails - "FTP files failed" and so on.

I therefore have about 12 different Batch files whichj is a pain.


Does anyone know of a better way to do this or how to incorporate all the errors in one batch.



Many thanks
 
Hi,

If you are using the Execute Process Task, it is very simple:

Write error.bat to accept parameters, eg
echo %1

where 1 represents the first parameter in a command line run and % is a reserved symbol for input parameters.

In the Execute Process Task, as the parameter put the error message you want to display.


This is the equivalent of running from DOS the line:
error.bat "message"
Which would show in a DOS window the line "message"

I hope that this is clear enough for you. I know it works as I use it to re-use batch files in my own DTS packages.


Kevin **************************************************************
Rock is Dead (Long Live Paper and Scissors)**************************************************************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top