1,160 pts.
 THREADSAFE parameter on DSPCMD STRSQL
Can i get the help on this parameter whose values are *YES and *NO. The value is currently *NO, when should and how can i change it to *YES. Will this improve the performance of my SQL procedures?

Software/Hardware used:
ASKED: October 6, 2008  11:52 AM
UPDATED: August 19, 2010  5:44 AM

Answer Wiki:
To show help for the parameter, run DSPCMD STRSQL again. The Display Command Information screen will appear. (Note: If you get a screen that shows 'Target command' and 'Current proxy chain', just make a note of the target command name and library, then run DSPCMD again with those values) On page 2 of the DSPCMD screen, you will see the Threadsafe parameter. Position the cursor on that line and press the HELP key (ALT F1 on my Client Access keyboard). You will get a window containing information about the parameter. You'll see that the Threadsafe parameter is informational - that is, it tells you something about the command and its underlying objects. You can't change the value of this parameter. Regards, Sloopy ============================================================ The THDSAFE() parameter can be set when you create a command, but it can't be changed later. Also, it doesn't control the behavior. Setting the value doesn't make the command threadsafe; it only tells the CL compiler whether the command is allowed to be run in a threadsafe program or not. Setting the value to THDSAFE(*YES) when the command-processing program is not threadsafe is risky. The risk is that the command may later be used in a program that uses threads. The command-processing program can then perform actions that cause threads to fail, damaging the job the command is running in. The parameter is intended tell later programmers how the command may be used. It doesn't make the command safe. Tom
Last Wiki Answer Submitted:  August 19, 2010  5:44 am  by  Sloopy   2,195 pts.
All Answer Wiki Contributors:  Sloopy   2,195 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _