All
I am looking to query a table that lies outside of Lawson using sql from a shell script. Is this possible? Any hints or tips?
It's pretty simple.
o Have the shell script generate a .sql file containing the query
o initiate a SQL session inside the shell script calling the sql script
o make sure the sql output goes to a file
o have your shell script parse the file to get the data you want or make the decisions you require.
o cleanup your temporary files
g'luck!
Awesome. I am going to give it a shot and i'll let yo know how it works out. ha.
The trick is getting that shell script to have the right environment variables set so you can access the database. You'd probably need the variables in your $LAWDIR/prodline/DATABASE file, or whatever database you're connecting to.
You didn't mention which flavor of RDBMS but if you don't get it to work I can send a small Oracle example.
-GW
Hi,
If this script is run on demand (not scheduled) and you want your users to be able to run it. Setup a tokendef app, enter the command to run the shell script in the command field, assign the token to the users security class and they'd be able to run the script on the fly.