|
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 |
1. Calling sql-server osql from rexx #13256 |
I've used the REXX ODBCc functions to connect and execute queries from a REXX .
I've used osql from perl scripts and I'd like to try it from REXX
I tried using iterateexe('osql -E -Q -d TESTDB -i query.sql -S DEVLSERVER -o out.txt -n') but I get "Window can't find 'osql...etc'. I have successfully run the 'osql -E -Q -d TESTDB -i query.sql -S DEVLSERVER -o out.txt -n' from a command window so I know my command string is correct.
Anyone have any ideas what I'm missing?
thankscliff:-) |
2. Not quite sure why you're doing it that way #13258 |
I use the ODBC code to access an XDB server (we use a product called Mainframe Express to develope colob code on the PC, and its database is XDB sever). I've also used the ODBC code to access DB2 databases on our z/OS mainframe with no problems (plus DB2 Express at home as well as SQLite). Granted, the only database on another system/server is the z/OS one, but in all scenarios I use the standard calls that Jeff has deocumented. |
3. Calling sql-server osql from rexx #13259 |
Michael,
I want to try the osql for a couple of reasons. one it would require a lot less codeing. The other is I'm having a problem with running a rexx program from a Window's scheduled task. I'm getting a authorization error when connecting to a database server. I can run the rexx from the command window with no problem.
Looking at the osql that works it has a '-E' specified which is for a trusted connection. I don't see a trusted connection option for Jeff's OdbcAllocDatabase() command. I think this is the cause of my authorization problem since its the only difference I see between the rexx odbc and osql..
If there is a way to specify a trusted connection with the rexx odbc conneciton I'd drop the idea of using osql.cliff:-) |
4. Calling sql-server osql from rexx #13260 |
I did find the odbc trusted connection command at site; http://www.devlist.com/ConnectionStringsPage.aspx
Trusted_Connection=yescliff:-) |
5. Ah, but did it #13261 |
work after the trusted_connection change ? |
6. Ah, but did it #13263 |
nope. :-(
I don't get it. Something about the scheduled task running the REXX that is missing.cliff:-) |
7. A long shot #13264 |
but if I compare what you're trying to do with an "equivalent" scenario on the mainframe.
Many installations have something similar to (what we have) RACF. This is an authorization application, but one of the things you can configure it to do is allow a program to be run when it's called from application A, but NOT from application B. Could your access problem be something like that (your command window is A, Rexx is B) ? |
8. old mainframer #13265 |
actually I started on the mainframe but now I do both (DB2 and sql-server DBA). I'm very familiar with RACF but weak in the windows security world.
I like the mainframe because I can find things but windows stashes stuff all over the place. "click here, click hear, click here, nope. ok click here, click here, nope. click here.........."
On of the many nice things about REXX is I can use it on the mainframe and windows. I've written a ton of stuff for the mainframe and I'm adding new stuff for the windows side all of the time. I've written a couple of rexx-gui apps to help me manage my sql-servers. I just wish I could figure out this scheduled task thing. Do you know it there is a authorization for access to the ODBC drivers?cliff:-) |
9. #13266 |
Hmmm. Mike could be onto something. Are you running RxLaunch.exe from a command prompt. Maybe the fact that it's a GUI program run from a command prompt is an issue. In that case, try a command prompt version of RxLaunch, called Reginald.exe:
http://home.roadrunner.com/~jgglatt/rexx/reginald.exe |
10. Another thought #13267 Posted by: Michael S 2010-03-20 22:10:00 Last edited by: Michael S 2010-03-20 22:10:27 (Total edited 1 time) |
Continuing the analogy with RACF. Most (all ?) security systems have a log somewhere that indicates who was being a naughty boy and how. Can you review the log on both machines ? |
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 |