Todd,
If your proc is the one being invoked in a UPoC, then wouldn’t you return $dispList thus returning to Cloverleaf(R) with the dispList however it was set?
So if a sub-proc changes dispList and you have it defined as global, then your proc has the effective changed dispList when the invoked proc just returns to you. You could also have it return with some sort of return information and you could check that as well if you wanted to.
However, I think that if the sub-proc changes dispList and returns to your proc, dispList now contains the updated value (hopefully a valid disposition list) and by returning to Cloverleaf with dispList (return $dispList) the intended message disposition will occur.
The big thing is that i normally wont be returning the dispist immediately when I’ve finished by sub proc. And i dont want to add code in the main script (parent script) to check the displist for changes, and the sub proc is used in several (currently about 10) scripts so in some cases displist may already not be blank. I just want to have the minimum amount of code in these parent scripts.
I tried the return -code return, and it seemed that by doing this, when viewing in the error db it showed up as a tcl error anyway. so i still am using a echo with an invalid variable.
The other thing im wondering is before i error out this message i want to shut the thread down, (as to not cause more errors).
Does cloverleaf always wait until a message has cleared a state before allowing a pstop to execute?
In other words, if i issue a pstop within my tcl script and then throw a tcl error, will it always send that message to the error db. I initially tried to not error out the message and just do a pstop thinking the message would remain in the recover db, but it appears to have been sent out, which is a problem since the message is going to a external db, so if it goes out on a bad odbc connection its really is just being lost.