ITP/Server will create a new session and associate this session with the active job. Every session has a unique storage area which can be used to store data associated with that session. Refer to chapter Using ITP/Server sessions for more information on sessions.
The command CreateSession will fail if the active job is already associated with a session.
CreateSession
Persistent(True or False);
Persistent: Optional.
Indicates whether or not the session should be automatically removed when the job ends. If this parameter is not specified the session will not be automatically removed.
The command CreateSession will create a directory structure in the directory ITPWork. If the session is persistent this structure will only be removed when the session is closed by the command CleanupSession or when it is expired using the command ExpireSessions. Scripts can access this directory through the _variable sessiondir.
The command CreateSession will generate an unique session identifier and will put this in the variable _sessionid. Subsequent jobs which are submitted with this session identifier will automatically be associated with the session. The application developer is responsible for returning the session identifier to the application and passing it back on subsequent calls. All calls with the same session identifier are serialized by ITP/Server.