net
start
command or by using the Windows
Services dialog box.
sasservicemngr.exe
.
The default SAS SCU directory is c:\Program Files\SASHOME\SASFoundation\
9.4\core\sasscu
.
sas.exe
-noterminal
. If the SAS SCU has been installed previously,
the default path is c:\Program Files\SASHome\SASFoundation\9.4\
followed
by sas.exe -noterminal
. The NOTERMINAL system option is required. To start a SAS program as a service, add the SYSIN system option followed
by the program pathname and filename to the Service Path. To select a service path, click ... (ellipse
button).
c:\Users\
user
ID\Documents\My SAS Files\9.4
.
To select a working path, click ... (ellipse
button).
Error Control
|
Description
|
---|---|
Ignore
|
The error is logged.
Start-up operations continue.
|
Normal
|
The error is logged
and a message is displayed. Start-up operations continue.
|
Severe
|
The error is logged
and start-up operations continue by using the last successfully installed
INI file.
|
Critical
|
An attempt to log the
error is made. If the start-up operation is using the last known successful
INI file, start-up operations fail. If the start-up operation is not
using the last known successful INI file, it attempts to restart the
service by using the last successful INI file.
|
1(TRUE)
in the INI file.
To further configure all access types settings, select the appropriate
boxes. For a description of access type settings, see SAS Service INI File Settings and Default Values . The access levels are
1(TRUE)
.
1(TRUE)
.
1(TRUE)
.
LocalSystem
.
Setting Name
|
Required
|
Explanation
|
Valid Values
|
Defaults
|
Related SAS SCU Field
|
---|---|---|---|---|---|
Service Name=
|
Yes
|
The SAS Service name
registered to Windows.
|
Can contain up to 32
characters (/ and \ are not valid). The name is not case sensitive
and it must be contained in quotation marks.
|
"SASService"
|
Service Name
|
Display Name=
|
Yes
|
The name of the service
that is displayed to user-interface applications.
|
Can contain up to 256
characters, is not case sensitive, and must be contained in quotation
marks.
|
"A SAS Service"
|
Display Name
|
Binary Pathname=
|
Yes
|
Contains the directory path in which the SAS Service INI file is installed, followed
by the SAS command
to start the service.
|
The pathname must be contained in both brackets and quotation marks.
|
["SAS
installation path\sas.exe -noterminal"]
|
Service Path
|
Start Type=
|
Yes
|
Specifies whether the
SAS Service is to start manually or automatically.
|
SERVICE_AUTO_ START
SERVICE_ DEMAND_START
SERVICE_DISABLED
|
SERVICE_ DEMAND_ START
|
Start Type
|
Dependencies=
|
No
|
Specifies Windows services
that must be started before this service is started.
|
One or more Windows service names, separated by the pipe (|) character. Enclose dependences
in quotation marks.
|
none
|
Dependencies
|
Description
|
No
|
A description of the
service
|
The description can
contain alphanumeric characters and must be enclosed in quotation
marks.
|
none
|
Description
|
WorkDir=
|
No
|
The directory used by applications to store files created and used by the SAS Service.
|
The path to the working directory must be contained in quotation marks.
|
"Under Windows
c:\Users\user ID"
|
Working Path
|
ErrorControl=
|
Yes
|
Determines the error
severity if the SAS Service fails to start.
|
SERVICE_ ERROR_ IGNORE
SERVICE_ ERROR_ NORMAL
SERVICE_ ERROR_ SEVERE
SERVICE_ ERROR_ CRITICAL
|
SERVICE_ ERROR_ NORMAL
|
Error Control
|
Interactive=
|
Yes
|
Specifies whether the
service allows a user to interact with the SAS desktop.
|
1(TRUE)
0(FALSE)
|
0(FALSE)
|
Interactive Process
|
AccessChgCfg=
|
Yes
|
Modifies the SAS Service
configuration.
|
1(TRUE)
0(FALSE)
|
1(TRUE)
|
Change Configuration
|
Access Interrogate=
|
Yes
|
Requests that the SAS
Service immediately update its current status.
|
1(TRUE)
0(FALSE)
|
1(TRUE)
|
Interrogate
|
Access PauseCont=
|
Yes
|
Pauses and resumes the
SAS Service.
|
1(TRUE)
0(FALSE)
|
1(TRUE)
|
Pause Continue
|
AccessQryCfg=
|
Yes
|
Makes queries about
the SAS Service configuration.
|
1(TRUE)
0(FALSE)
|
1(TRUE)
|
Query Configuration
|
AccessQry Status=
|
Yes
|
Queries Windows about
the status of the SAS Service.
|
1(TRUE)
0(FALSE)
|
1(TRUE)
|
Query Status
|
AccessStart=
|
Yes
|
Starts the SAS Service.
|
1(TRUE)
0(FALSE)
|
1(TRUE)
|
Start Service
|
AccessStop
|
Yes
|
Stops the SAS Service.
|
1(TRUE)
0(FALSE)
|
1(TRUE)
|
Stop Service
|
AccessUser DefCtrl=
|
Yes
|
Specifies a user-defined
control code.
|
1(TRUE)
0(FALSE)
|
1(TRUE)
|
Define Control
|
ServiceStart Name=
|
No
|
The Windows user account
with proper user rights to run the SAS Service.
|
LocalSystem or Windows
account name
|
LocalSystem
|
This Account
|
Password=
|
No
|
The Windows account
password.
|
an encrypted password
|
none
|
Password
|
mypw
as
the input password: proc pwencode in='mypw'; run;The SAS log displays the encrypted password
{sas001}bXlwdw==
.
You then specify {sas001}bXlwdw==
as
the value for the Password= setting in your INI file. An encrypted
password is necessary only if you specify Password= in an INI file.
In comparison, when you create an INI file by using the SAS SCU, you
specify a text password. The SAS SCU encrypts the password for you.
sasservicemngr.exe path/filename.ini
.
When you install a SAS Service from the command prompt, user messages
are disabled.
sasservicemngr.exe path/filename.ini
.
The following table lists the return codes that can be passed back
to the calling application:
Numeric Code
|
Error Code
|
Description
|
---|---|---|
0
|
SUCCESS
|
The service has successfully
been installed.
|
5
|
ERROR_ACCESS_DENIED
|
Access to the Service
Control Manager is denied.
|
6
|
ERROR_INVALID_HANDLE
|
Error loading the Service
Control Manager.
|
25
|
ERROR_NOT_FULL_PATH_CREATED
|
The full path could
not be created.
|
26
|
USER_CANCELED_INSTALL
|
The user canceled the
installation.
|
30
|
SUCCESS_NO_REG_DIR
|
The service was installed but failed to register the working directory.
|
35
|
ERROR_BINPATH_NOTFOUND
|
The service file was
not found, no installation
|
40
|
ERROR_USER_CANCEL_NOSRVC
|
The user canceled the
installation because an INI file was not found.
|
50
|
ERROR_MISSING_FILE_ARGUMENT
|
A required argument
in the INI file is missing.
|
51
|
ERROR_INVLAID_FILE_ARGUMENT
|
An INI file argument
contains an incorrect value.
|
55
|
ERROR_OPENFILE
|
The INI file could not
be opened.
|
60
|
ERROR_ITEMTOOLARGE
|
A string value exceeds the maximum character limit.
|
65
|
ERROR_PASSED_DECRYPT_FAILED
|
The password could not
be decrypted.
|
87
|
ERROR_INVALID_PARAMETER
|
A service parameter
is incorrect.
|
123
|
ERROR_INVALID_NAME
|
The specified service
name is not valid.
|
1057
|
ERROR_INVALID_SERVICE_ACCOUNT
|
The account name is
incorrect or does not exist.
|
1060
|
ERROR_SERVICE_DOES_NOT_EXIST
|
The specified service
does not exist as an installed service.
|
1065
|
ERROR_DATABASE_DOES_NOT_EXIST
|
The specified database
does not exist.
|
1072
|
ERROR_SERVICE_MARKED_FOR_DELETE
|
The specified service
has been marked for deletion.
|
1073
|
ERROR_SERVICE_EXISTS
|
A duplicate service name exists on the network.
|
1078
|
ERROR_DUPLICATE_SERVICE_NAME
|
A duplicate display name exists on the network.
|
net start
command or by
using the Services dialog box.
sasservicemngr.exe /remove
<servicename>
.