Chapter Contents


SAS/SHARE User's Guide

CMS: Creating the Server Environment

You must perform the following steps to create the server environment on a CMS host:

  1. Set SAS system performance options.

  2. Create a VM directory entry for the server virtual machine.

  3. Format the server minidisks.

  4. Create a PROFILE EXEC for the server.

  5. Place SAS libraries on the server minidisks.

Setting SAS System Performance Options

The following SAS system options can be used to tune server performance.

specifies the size of a contiguous buffer for each open SAS file. The SAS default option BLKSIZE= is set to enable optimum I/O buffering during sequential processing of SAS data libraries. Because a server's processing is primarily random, the default value of this option can actually increase the amount of I/O that is performed within a server and can cause the performance of the server to be less efficient. The value of the BLKSIZE= option increases the amount of data that is read or written when a user requests that I/O operations be performed on the shared data. The performance of a server is less efficient when the increased amount of data is of no relevance to the individual user's request for specific portions of the data.

Specifying BLKSIZE=0 when invoking SAS in the server environment can help avoid unnecessary use of the server's virtual storage and can help you reduce the amount of I/O performed in the server execution.

MEMSIZE=n | nK | nM
specifies a limit on the total amount of memory that SAS uses at any one time. The server should be allowed a large amount of memory in order to accommodate the needs of all its users. The number of concurrent SAS files open by server users and the number and size of I/O buffers for each SAS file have a direct impact on the amount of memory required by the server. You should be aware that, in some cases, SAS terminates abnormally when it is unable to satisfy a memory request.

You can use the following values with the MEMSIZE= option:

specifies a number in the range 0 to 2,147,483,648. A value of 0 indicates that there is no limit except the operating environment limit, which may be site specific.

specifies the number of kilobytes, from 0 to 2,097,152.

specifies the number of megabytes, from 0 to 2048.

For the CMS environment, the default is MEMSIZE=0. In order to limit the amount of virtual memory that SAS can use, you should specify a value for the MEMSIZE= option. For SAS/SHARE, you may want to specify a value of 16M or 20M for the MEMSIZE= option to allow for peak usage periods.

specifies the size of the virtual I/O buffer to be used for WORK data sets. Because a server does not use data sets in the WORK library, VIO memory is not used by a server.

Specifying a value of 0 (zero) for this option allows a server to make more efficient use of its virtual storage.

specifies that the SAS log file (which was specified in the ALTLOG= option) is opened so that other processes can read it, and that each line written to the log is then immediately transferred to disk. This option enables you to examine the server SAS log while the server is running. The UNBUFLOG option must be specified in a SAS command or in a SAS configuration file.

Note:   The overhead that is incurred by the UNBUFLOG option may degrade the performance of a busy server.   [cautionend]

A typical SAS configuration file follows:


See SAS Companion for the CMS Environment for more information about these SAS system options.

Creating a VM Directory Entry for the Server Virtual Machine

To use SAS/SHARE software, you must first create a VM directory for each server virtual machine. The following code example shows a typical VM directory entry for a server virtual machine.

CONSOLE 009 3215
SPOOL   00C 2540 READER 8
SPOOL   00D 2540 PUNCH A
SPOOL   OOE 1403 A
MDISK 191 3380 707 5 VM0800 MR XXXXXXX
MDISK 192 3380 501 3 VM0450 MR XXXXXXX

The following section describes the directory records for the VM directory entry for a server virtual machine.

USER Directory Record

The default virtual storage size and the maximum virtual storage size of the server virtual machine should be the same. It is impractical to stop the server, define its virtual machine storage size to a large value, and then start the server again.

The amount of virtual storage that a server requires depends on the following factors:

The preceding VM directory entry code example shows that the server executes in a 20-megabyte virtual machine, but 20 megabytes may not be the optimal virtual storage size for the SAS server at your site. Use the default storage size for interactive virtual machines at your site, and then alter (increase or decrease) the value if necessary.

If you run a VM/XA operating system and want to provide your server with sufficient virtual storage, you may use one or more XA-mode virtual machines.

A server does not require a CP command privilege class that is higher than G.

The dispatching priority of the server virtual machine should initially be the default value for interactive VM users. Monitor your system's performance to determine whether you should assign a higher or lower dispatching priority.

IPL Directory Record

The server virtual machine should be IPL CMS (or CMSXA). Do not specify PARM AUTOCR if the class A or B CP command AUTOLOG is used to log on to the server because the AUTOLOG command passes a line of data to satisfy the server virtual machine's first console read. However, you should specify PARM AUTOCR when running the server interactively. No negative effects have been observed when PARM AUTOCR is specified and an AUTOLOG command is used to log on to the server virtual machine.

OPTION Directory Record

Specify the REALTIMER option while defining the server virtual machine. The effect of the REALTIMER directory option can be duplicated by including the CP command SET TIMER REAL in the PROFILE EXEC of the server virtual machine.

The MAXCONN parameter of the OPTION record specifies the maximum number of SAS users under CMS who can connect to the server at one time. IBM limits the value that you can specify for MAXCONN to 65535. SAS/SHARE software does not specifically limit the number of simultaneous connections to a server.

IUCV Directory Record

The IUCV directory record is required for the server's virtual machine.

The ALLOW parameter enables users to establish IUCV connections to the server virtual machine.

The PRIORITY parameter enables the server to send IUCV priority messages to users.

The MSGLIMIT parameter increases the number of outstanding messages that are allowed on each path from 10 (the default) to 25.

MDISK Directory Records

Because the modules that constitute SAS/SHARE software on CMS reside either on your SAS System or on the SAS/SHARE minidisk, the server requires no minidisk space of its own for program storage.

When you configure your first server, you may want to use the single read-write minidisk at virtual address 191, file mode A. The minidisk should be large enough to hold all the SAS data sets that are shared through the server. If you already have SAS data sets that you copy to the server's minidisk, the minidisk must be large enough to contain all the data sets. You should also allow some extra room for growth.

Alternatively, you can allocate several minidisks to a server. This enables you to divide space according to departments and application systems.

If a DATA step or a procedure is used to replace server data sets, you must allow space for two copies of each data set that the DATA step or the procedure replaces. You rarely need to allow space for all server data sets on a minidisk to be replaced at the same time. Instead, find the DATA step or the procedure that replaces the largest server data sets, and allow room for two simultaneous copies of those data sets.

Formatting the Server Minidisks

At some sites, the VM system administrator formats minidisks when a new virtual machine is defined. However, if you must format the server minidisks, you should specify a BLKSIZE= option of 4K or 4096 in the CMS FORMAT command. This allows the maximum amount of data to be transferred in each I/O operation, which is the most efficient for the server.

Creating a PROFILE EXEC for the Server

Because of the way it is used, a server is classified as a service virtual machine. It is often convenient to have service virtual machines logged on automatically by the VM system as part of the IPL process. If the server is logged on automatically when the VM system is initialized, then you do not have to re-start the server when your VM system is taken down and is brought back up.

You should discuss with your VM system administrator the possibility of including your SAS/SHARE servers in the automatic log on process before you write the server's PROFILE EXEC.

If you always execute the server interactively, the PROFILE EXEC needs to set up only the virtual machine environment. However, if the server virtual machine is automatically started when your VM system is initialized, the PROFILE EXEC must set up the virtual machine environment and also must invoke the SAS System and run the PROC SERVER statement.

The following code example shows a sample PROFILE EXEC that detects whether the virtual machine is being logged on to by a person from a terminal or by the system automatically.

/*PROFILE EXEC (written in REXX)*/ x = diagrc (24, -1) /*Ask about virtual console*/ y = substr (x, 11, 1 /*Cond. Code 2:no real device*/ if (y = '2') then do /*We're being AUTOLOGed*/ 'CP SPOOL CONSOLE TO * START' /*spool console*/ 'CP SET SMSG IUCV' /*receive SMSGs*/ push 'SAS RUNSHARE ( LT' /*start server */ end else do /*Coming up interactively*/ 'CP TERM CHARDEL OFF' /*Turn off CHARDEL editing*/ 'CP TERM LINEDEL OFF' /*Turn off LINEDEL editing*/ end return

The preceding EXEC assumes that the EXEC that is used to invoke the SAS System is named SAS. If your installation uses an EXEC with a name other than SAS to invoke the SAS System, change the preceding example, as necessary.

The sample PROFILE EXEC determines whether the virtual machine is being logged on in interactive mode or disconnected mode. It makes this determination by using the DIAGRC and SUBSTR functions, which are documented in the system product interpreter reference for the system that you are running, and DIAGNOSE code 24, which is documented in VM/XA CP Programming Services. In this example, the variable X is assigned information about the virtual console. The variable Y is assigned information that indicates whether the virtual console is associated with a real device. If the virtual console is not associated with a real device, the log on must result from an AUTOLOG command.

If the log on results from the AUTOLOG command, the PROFILE EXEC prepares for and begins a server session. It spools the console to the virtual machine's reader so that a record is kept of the server's activities. The EXEC then stacks a SAS command that begins a SAS session after the PROFILE EXEC finishes. The LT option is used so that the SAS log from the server session is included in the console spool file.

Placing SAS Libraries on the Server Minidisks

If the SAS data libraries that you want to share exist already, you can copy them to the server minidisks before you start the server. Use the CMS COPYFILE command or invoke SAS and perform the COPY procedure to copy the libraries. While the server is running, you can use DATA steps and procedures with the server in order to create the files that you want to share.

Chapter Contents



Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.