Greeting y'all, an especially to Jose Manuel, who started the thread " Dynamically setting PDQPRIORITY and OPTCOMPIND for a session within a Procedure".
I have run a few SQL scripts and forgotten to set environment variables like PSORT_NPROCS, PSORT_FBTEMP, and DBDATE. I have to remember to set these at the shell level before starting dbaccess. Wouldn't it be great if I could set these in the SQL script? So Jose's question put the idea into my head: Lemmy try that with env variables I listed above. It didn't go as hoped:
$ dbaccess whatever -
Database selected.
> set environment PSORT_NPROCS '4';
19840: Invalid session environment variable.
Error in line 1
Near character position 31
> set environment optcompind '0';
Environment set.
> set environment DBDATE 'Y4MD';
19840: Invalid session environment variable.
Error in line 1
Near character position 28
One difference I see is that OPTCOMPIND is an onconfig parameter, while PSORT_NPROCS and DBDATE are not. BTW, I've tried it with and without the quote and I have tried "set DBDATE Y4MD".
It would be nice if I could indeed set my environment variables within my SQL session. I woud not be forced to embed my SQL sessions inside a shell script.
Your thoughts, all?
------------------------------
+-----------------------------------------------------------+
| I am pleased to report that I had no problems today. |
| I had only issues, opportunities, challenges and valuable |
| learning experiences. |
+------------------------------------------ Jacob S --------+
------------------------------