Executing "db2look" in VB Excel - Getting Run-Time error: An unexpected "db2look" was found - vb.net

I am trying to execute "db2look" command from within Excel using VB. But I'm getting Run-time Error
An unexpected token "db2look" was found following "BEGIN-OF-STATEMENT". Expected tokens include: "DECLARE". SQLSTATE=42601
I know connection and everything is fine, as I am able to run simple select queries and based on error it's not connection issue but rather like "db2look" not recognized or valid. I've ran same exact command in cmd window at it works fine.
Just wondering if anyone has been able to run the "db2look" command outside of db2 command window/editor and using VB/Excel? Or if there is something that I am missing.
Thanks

db2look is a tool and standalone executable which cannot be run like a regular SQL statement. It needs to be run from the command line (shell).

Related

Why JCL encountered error IGYWCL expansion

I wrote a cobol code to add record to a file and I runed it using jcl but encounterd an error. The error message is:
´´ procedure IGYWCL was expanded using system library sys1.proclib ´´.
How can i fix this error.

nand2tetris CPUEmulator says 'Illegal character'

I'm studying the online course from nand2tetris.com through Coursera. When I try to run the nand2tetris CPUEmulator I get the error message 'Illegal character'. Even the simplest program with one command '#0' I get the error message. I tried indenting 0-10 spaces, and I tried the binary version of the command '0000000000000000' and I still get the error message. To run the emulator I'm using a MacBook and I type the command 'CPUEmulator.sh' into the terminal. I'm using TextEdit with Plain Text format. I named the file 'test.hack'. What am I doing wrong?

Run a script.sql

When trying to run a #'c:/.../.sql' on sqldeveloper an error occures : impossible to find the path ??
This, literally
#c:\temp\test.sql
executed in SQL Developer's Worksheet works just fine. (Software version is 17.4, if that matters).

SQL16010: Incorrect syntaxt after using :r on a database project

I have a database project with the following structure
When I try to publish the profile, the VS compiles de code before and is showing me the following error:
SQL46010: Incorrect syntax near .
I have this option enable for the SQLCMD on my VS configurations
My OneTimeMaster.sql looks also has another error after :r, the code looks like this
:setvar path ".\Sprint 1.11"
:r $(path)\Header.sql
How can I make it run just to get the generated script.
I am assuming that your post-deployment or pre-depolyment script are pointing to your OneTimeMaster.sql, on that case if you have your SQLCMD activated, the pre and post deployment sqls will not have any error, but when you try to make a build seems like the other files interpreted by the compiler as regular sql without the SQLCMD command. I tested your scenario and the way that I was able to generate the script was changing the Property Action of the OneTimeMaster.sql and all the subsql files to None. Doing that the generated script had the merge of your Testing1.sql and Testing2.sql. Hope this helps

ActiveTCL - Unable to run a batch file from an Expect Script

I was originally trying to run an executable (tftpd32.exe) from Expect with the following command, but for some unknown reason it would hanged the entire script:
exec c:/tftpd32.351/tftpd32.exe
So, decided to call a batch file that will start the executable.
I tried to call the batch file with the following command, but get an error message stating windows cannot find the file.
exec c:/tftpd32.351/start_tftp.bat
I also tried the following, but it does not start the executable:
spwan cmd.exe /c c:/tftpd32.351/start_tftp.bat
The batch file contains this and it run ok when I double click on it:
start tftpd32.exe
Any help would be very much appreciated.
Thanks
The right way to run that program from Tcl is to do:
set tftpd "c:/tftpd32.351/tftpd32.exe"
exec {*}[auto_execok start] "" [file nativename $tftpd]
Note that you should always have that extra empty argument when using start (due to the weird way that start works; it has an optional string in quotes that specifies the window title to create, but it tends to misinterpret the first quoted string as that even if that leaves it with no mandatory arguments) and you need to use the native system name of the executable to run, hence the file nativename.
If you've got an older version of Tcl inside your expect program (8.4 or before) you'd do this instead:
set tftpd "c:/tftpd32.351/tftpd32.exe"
eval exec [auto_execok start] [list "" [file nativename $tftpd]]
The list command in that weird eval exec construction adds some necessary quoting that you'd have trouble generating otherwise. Use it exactly as above or you'll get very strange errors. (Or upgrade to something where you don't need nearly as much code gymnastics; the {*} syntax was added for a good reason!)