set_sessionparameter (p, v)

The set_sessionparameter(p, v) function assigns the value v to the session parameter p. You can use session parameters to store values between jobs associated with the same session.

For more information, see KCM Core sessions.

This function returns a value of type Boolean, indicating success or failure.

Example

Var Boolean Dummy = set_sessionparameter ("plugh", "plover");
Var Text X = get_sessionparameter ("plugh"); 

Result: "plover"

Remarks

If the function succeeds, the return value is True. If the current script is not associated with a session, or if the function fails in some other way, an error is thrown. If KCM Core has been instructed to ignore errors using the command OnError Script(*), and an error occurs, the function returns False, and the _error constant is set to True.

To avoid the use of a dummy variable, use the command SetSessionParameter instead.

SetSessionParameter
  Par("plugh")
  Value("plover");
Var Text X = get_sessionparameter ("plugh"); 	

Result: "plover"

Session parameters with names starting with _itp or ITP are reserved for internal use in KCM products.