THREADSAFE parameter on DSPCMD STRSQL

1160 pts.
Tags:
AS/400
SQL/400
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?

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following