Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


spenny
2014-10-17T14:08:12Z
Hi,

I'm trying to get VisualCron to call Teradata's BTEQ.exe directly but can't seem to get it working. If I put the below line in to a txt file and save it as a .bat file, I can successfully run it when calling from visual cron so I know my credentials / background execution settings etc are working ok. I'd like to call bteq directly from VisualCron instead of having to create .bat files for each of our processes though.

"C:\Program Files (x86)\Teradata\Client\15.00\bin\bteq.exe" < "C:\SCRIPTS\SCRIPT1.txt" > "C:\SCRIPTLOGS\SCRIPT1.txt" 2>&1

I've tried putting C:\Program Files (x86)\Teradata\Client\15.00\bin\bteq.exe in the command field and the argument / parameters as above in the arguments field which seems to load bteq but then fails because it doesn't recognise the parameters.

Would anybody have any ideas?

Cheers!
Sponsor
Forum information
Support
2014-10-17T14:43:51Z
First try:

1. command: C:\Program Files (x86)\Teradata\Client\15.00\bin\bteq.exe
2. argument: C:\SCRIPTS\SCRIPT1.txt

Is that working?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
spenny
2014-10-17T15:06:42Z
It seems to open bteq but doesn't correctly call the file.

Task output shows:

BTEQ 15.00.00.00 Fri Oct 17 16:04:14 2014 PID: 5516

+---------+---------+---------+---------+---------+---------+---------+----
C:\SCRIPTS\SCRIPT1.txt
+---------+---------+---------+---------+---------+---------+---------+----
*** BTEQ exiting due to EOF on stdin.
*** Exiting BTEQ...
*** RC (return code) = 2
Support
2014-10-20T07:46:36Z
Ok, I realize there is a difference between STDIN and arguments. Please try your original one line command in command and then check:

- Use shell execute
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
spenny
2014-10-23T16:54:11Z
Hi - tried that but I just get a message saying "the job could not be started because the file could not be found. Please check path". I also had a warning about credentials so had to disable them too.
bbusse
2014-10-23T17:33:28Z
What if you did the path to cmd.exe as the program and start the arguments with /c followed by the command (your entire command).

1: c:\windows\system32\cmd.exe
2: /c "c:\blah\blah\blah\bteq.exe < c:\script.txt > c:\scriptlogs\log.txt" etc....

I don't have the BTEQ software or even know what it is to try and help, but it may be an option vs saving a batch file. you're still sending it through the command prompt this way.

Brian
spenny
2014-12-17T12:08:18Z
Hi - sorry for the delay - we've been speaking to Teradata about this but still no luck - the above example using /c appears to work but if the process fails, it results in bteq locking any file it is accessing.

It appears the the bteq.exe file must be called with the argument " < INPUT_FILE >TXT > LOGFILE.txt ". We can get rid of the log file and use visualcron to write it to a file but the thing we can't get around is using "<" to specify the input file (SQL to run). For now, we're just having to default back to our old scheduler.
Scroll to Top