SPL/environment variables (and an apology)
Posted in 1996
Hi everyone, I've written a couple of Stored Procedures that run an ACE report that sends its output to printer. They compile OK, and run without any errors in the debug file, but nothing comes out of the printer. This had me foxed for a while, but yesterday I added a 'system "env >> debugfile"' to one of them, and the environment bears no relation to my environment. So, my question is, how can I get environment variables into the SP. I'm fine with general ones like INFORMIXDIR - just source a command file, but what about user-specific ones like DBPRINT? As far as I can see, there are 2 alternatives: 1. Change the ACE report so that it outputs to a file, and run the SP and print the file from a shell script. 2. Call a shell script from the SP which sets the DBPRINT variable: #!/bin/csh grep DBPRINT ~/.login >> tfile source tfile I prefer option 2, but it's still messy - isn't there an easier way to do this? TIA, Richard. Now for the apology. If any of you received bounced mail from my address when you posted to the list recently, I'm sorry. My company is in the process of relocation, and all our unix servers (except the internet firewall) were moved the weekend before last. "Fear not", said our sysadmin, "Any mail received will just sit on the firewall machine until the other servers are up and running". WRONG!!! Servers came up Monday lunchtime and surprise, surprise, I'd got no mail between 5.30pm Thurday and 12.30pm Monday. Last Friday they moved the firewall machine without telling us, so that gave us another few hours downtime.