Arbortext Command Language > Repository API > sess_start
  
sess_start
sess_start (adapt, userid, pw, dmsid, adptdata, mode, win)
Connects a user to a repository. This function is a wrapper for other functions such as sess_connect and sess_initialize and is the preferred method of connecting users to repositories using ACL.
The following table summarizes the parameter values.
Parameters for sess_start function
Parameter
Description
adapt
String identifier for adapter (case sensitive).
For the PTC Server connection: PTC Server
userid
User ID for desired repository.
pw
User's password for access to desired repository.
dmsid
Identifier for repository.
For the PTC Server connection: URL to the PTC Server.
adptdata
Adapter data.
For the PTC Server connection: Use the context and workspace separated by a comma. For example: "context=ProductA,workspace=ws1"
mode
Set to one of two values: interactive or batch. Use the interactive setting if the function is being called as a result of a user interface event (for example, clicking a connect button on a dialog). Use the batch setting if you are connecting to the repository using a batch script. If no value (that is, "") is given, mode will default to batch.
win
If the mode parameter is set to interactive, set the win parameter to the window handle for the dialog that called sess_start. If the mode parameter was set to anything other than interactive, set this value to zero (0).
If the operation fails, the function places error data in $main::ioerr and returns -1. If successful, the function returns a new session handle for the connection.
When disconnecting a user from a repository, use the sess_end function to perform all the disconnection steps in their proper order.