SAS/CONNECT Spawner in z/OS

Setting Up the SAS/CONNECT Spawner in z/OS

The SAS/CONNECT spawner runs as a z/OS started task and uses z/OS UNIX System Services (USS) to start each user’s SAS/CONNECT session. The spawner listens for requests from clients and passes them to the start-up command that is associated with the service and port in which there is activity. The start-up command starts a SAS/CONNECT server session.
The basic steps for starting the spawner and SAS server session in z/OS are as follows:

Location of the Spawner in z/OS

The SAS/CONNECT spawner module is CNTSPAWN and it is located in the SAS load module library. This library might be installed in LPA, LINKLIST, or allocated to the STEPLIB DD in the Spawner Started Task JCL. On z/OS systems, SAS recommends operating servers as started tasks. Therefore, to start the SAS/CONNECT spawner, you should create a started task procedure in the system PROCLIB library. A sample spawner started task procedure can be found in ‘&prefix.BAMISC(SPNCCNTL)’.

Spawner User ID on z/OS

The z/OS system considers the SAS/CONNECT spawner a daemon process. Therefore, if the BPX.DAEMON profile in the RACF FACILITY class and RACF Program Control are active, then the user ID for the spawner started task does not require superuser (uid=0) authority. The SAS load module library must be program-controlled, but the spawner user ID does not require READ access to the BPX.DAEMON profile. The spawner no longer requires APF authorization.
To assign a user ID to the started task, do either of the following:
  • add the started task to the RACF Started Procedures Table ICHRIN03
  • define a profile for the started task in the RACF class STARTED

Starting the Spawner in z/OS

To start the z/OS spawner, use the following command:
START <started-task-name>
This command initiates the started task. The spawner started task requires a PARMS file. The PARMS file contains any spawner invocation options that you need to specify when starting the spawner on z/OS. A sample PARMS file can be found in ‘&prefix.BAMISC(SPNCPARM)’. Implementing SAS TSO Support
See Configuration Guide for SAS® 9.4 Foundation for z/OS for more information about the ‘&prefix.BAMISC’. library.
For a list of spawner invocation options, see Options for Starting and Managing the SAS/CONNECT Spawner.

Starting SAS Using a Shell Script

The spawner uses UNIX System Services (USS) to invoke a USS file system shell script that starts SAS.
Example:
   -sascmd "/usr/local/bin/spawnsas.sh -nosasuser -noterminal"
This command assumes that a shell script named spawnsas.sh is installed in /usr/local/bin. The command specifies the -NOSASUSER SAS system option . The -NOTERMINAL option prevents the display of a dialog box in the server session. In addition, the two double quotation marks around the SAS options are required.
The shell script interprets the parameters that are received from the spawner and builds a TSO command that starts a SAS session. The sample UNIX shell script parses the command and interprets environment variables to build a TSO command to start SAS. This command is executed using either the USS /bin/tso command or the USS /bin/tsocmd command.
You must change the values of &prefix to the high-level qualifier of your CList library that contains the TSO command to start SAS. The BPX environment variables are specified to improve the start-up performance of a spawned SAS session.
A sample USS script file can be found in ‘&prefix.BAMISC(SPNCSHEL)’.
Note: The /bin/tso command mentioned above is used by default in the UNIX shell script. If you need to run authorized commands in SAS 9.3 and later releases, use the /bin/tsocmd command instead. See Usage Note 54530 for information about setting the /bin/tsocmd command in the UNIX shell script.

Ending the Spawner on z/OS

To stop the spawner, do one of the following:
  • use CTRL-C to kill the process
  • if the spawner was started as a started task, specify STOP <started-task-name>
   STOP  <started-task-name>