This is driving me crazy. I can run scripts in bteq's interactive mode, but I cannot get it to work with the command line.
Here is my very simple script that exists at this path:
Also, try redirecting stdout and stderr to an output file so you can see all the messages BTEQ produces. For example...
bteq < my.in > my.out 2>&1
I'm not sure what you mean, but that is my entire script above. I realize that selecting from dbc.users is pretty boring, but I was just doing it so make sure I can run a bteq script successfully. (I'm a newbie.)
Once I get this to work, I'll do something worthwhile like exporting or INSERTING, etc.
I hope I answered your question...
Okay, I redirected stout and sterr and I got this in the my.out file:
"BTEQ 13.10.00.11 Wed Sep 23 12:48:22 2015
So Fred's question was spot on. The very first thing BTEQ sees is the word "bteq". Since "bteq" is not a recognized BTEQ command keyword, BTEQ submits the instruction as an SQL request. Get rid of the leading and trailing parts that caused the "here file" submission under shell.
Thanks guys! I can now login. For any other newbies struggling, I basically changed the file to a .sh and then got rid of the bteq << at the top line. Yeah, pretty stupid I realize.
Now I have a new error message, but at least it's logging in!