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.
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.