Chapter Contents

Previous

Next
SAS/SHARE User's Guide

OS/390: Creating the Server Environment

You can invoke the SAS System from a TSO session, a batch job, or a started task. However, it is recommended that you use a started task to invoke SAS in order to run the PROC SERVER statement.

Note:   If you use the cross-memory services access method, do not invoke the SAS System and create the server in a batch environment. Doing this may cause the batch initiator to drain when the server execution ends, which renders the address space (ASID) no longer usable.  [cautionend]

  1. To start the server, create a member that is named SERVER in the system's start task procedure library that contains the JCL shown in JCL in the System's Start Task Procedure Library
    
    JCL in the System's Start Task Procedure Library
    //SERVER PROC ENTRY=entry, ID=id, SERVOPT='options', UAPW=uapw,OAPW=oapw //SA EXEC PGM=&ENTRY,DYNAMNBR=50mREGUIB=4096K, // PARM='IS="%SHRMACS(SERVER);%STRTSRV(&ID', // '%STR(&SERVOPT),&UAPW,&OAPW)*,other-options') //STEPLIB DD DISP=SHR,DSN=&prodfix.LIBRARY //CONFIG DD DISP=SHR,DSN=&prodfix.CNTL(BATCHXA) // DD DISP=SHR,DSN=&prodfix.CNTL(SRVCNFG) //SASAUTOS DD DISP=SHR,DSN=&prodfix.AUTOLIB //SASHELP DD DISP=SHR,DSN=&prodfix.SASHELP //SASMSG DD DISP=SHR,DSN=&prodfix.SASMSG //WORK DD UNIT=SYSDA,SPACE=(6144,(500,200),,,ROUND) //SASLOG DD SYSOUT=*,DCB=(BLKSIZE=141,LRECL=137,RECFM=VBA) //SASSNAP DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD DUMMY

    where

    entry
    is the value that is specified for the ENTRY= parameter in the cataloged procedure that is used to invoke the SAS System from a batch job. This procedure was created when base SAS software was installed. For details about this procedure, see Installation Instructions and System Manager's Guide for the SAS System, Version 8 under OS/390.

    id
    is the server name (default or otherwise) that is passed to the PROC statement in the STRTSRV macro.

    options
    can be any valid option in the PROC SERVER statement. For information about PROC SERVER options, see The SERVER Procedure.

    uapw
    is the user-access password for the server.

    oapw
    is the operator (or server administrator) password for the server.

  2. Notice that the PARM= parameter uses a macro named STRTSRV to start a server. %STRTSRV is a standard SAS/SHARE autocall macro. For more information about the STRTSRV macro, see The SAS/SHARE Macros and STRTSRV. Alternatively, you may use the SERVER macro to start a server. %SERVER executes faster than %STRTSRV. For more information about the SERVER macro, see The SERVER Procedure.

    To use %SERVER instead of %STRTSRV in the PARM= parameter, change the EXEC statement as follows:

    //  PARM='IS="%SERVER(&ID,&SERVOPT,&UAPW,&OAPW)"'

  3. After the member SERVER that contains this JCL has been created, the console operator issues the following command to create the server as a started task:
    START SERVER

  4. When this command executes, the procedure passes the appropriate parameters to the SAS macro, STRTSRV or SERVER, which invokes the PROC SERVER statement.

  5. To create a new server (one whose name is different from the ID= parameter in the JCL), enter the following:
    START SERVER,ID=serverid

  6. To enter the default PROC SERVER options that are indicated in the SERVOPT= parameter in the JCL, enter the following:
    START SERVER,SERVOPT='options'

  7. To override the user- and operator-access passwords in the START command and to override those that are specified in the UAPW= and OAPW= parameters in the JCL, enter the following:
    START SERVER,UAPW=uapw,OAPW=oapw

  8. To enter all of these specifications in one START command and to override those in the JCL, enter the following:
    START SERVER,ID=serverid,SERVOPT='options'
                 UAPW=uapw,OAPW=oapw


Invoking a SAS Program That Starts a Server

The OS/390 environment offers two methods to automatically invoke SAS and start a server:


Using the Static Program Method

To use the static program method, store a SAS program that contains PROC SERVER in an external file. See Starting and Managing a SAS/SHARE Server for information about writing a SAS program to start a server. Invoke the SAS System by specifying the program as the primary input data stream. To use the program in the started task, locate the following line in the previous JCL code example.

//SYSIN DD  DUMMY

Change it to read as follows:

//SYSIN DD DSN=data-set-name,DISP=SHR

This method creates a server the same way each time the program runs.


Using the Macro Method

Although it is recommended that you use the STRTSRV macro from the SAS macro autocall library (see Using SAS/SHARE Macros for Server Access), you can also create and use the SERVER macro, which executes faster than %STRTSRV.

Before you can use the SERVER macro, you must create a member named SERVER in the SAS macro autocall library and add the following statements:

%MACRO SERVER(id,servopt,uapw,oapw);
%********************************************;
%* This macro invokes PROC SERVER to create *;
%* a server with the specified id.          *;
%********************************************;
  PROC SERVER ID=&id &servopt
     %if (&uapw-=) %then
          %do;
             UAPW=&uapw
          %end;
     %if (&oapw-=) %then
          %do;
             OAPW=&oapw
          %end;
     ;
  run;
  endsas;
%MEND;


Setting SAS System Performance Options

These options affect the operation of the server.

Default values for these options are set in the SAS/SHARE server configuration file.

BUFNO=n | nK | nM | nG | MAX | MIN | hexX
specifies the number of buffers to use for SAS data sets. Under OS/390, the default value in the SAS/SHARE configuration file is 1.

For SAS/SHARE, setting the value of the BUFNO= option too high may hurt performance by using too much memory because SAS/SHARE may be accessing multiple files at one time.

The maximum number of buffers you can allocate is determined by the amount of memory available. See All Hosts: Setting SAS System Performance Options for more information about the BUFNO= option.

STAE
The server should execute with the STAE option in effect so that serious but recoverable errors that are encountered by the server do not cause it to terminate abnormally.

SVC0SVC=
SVC0R15=
The SAS SVC Routine 0 is required for SAS/SHARE software. You must specify the SAS system options SVC0SVC= and SVC0R15= to accurately reflect the way the SVC was installed. Get this information from the person who installed base SAS software.

MEMLEAVE
New for Version 7 and Version 8, this option stores supplemental memory storage, which is a dynamic amount of space in a user's available region. The MEMSIZE= option is reserved for cleanup that is required when SAS has used all available memory and abends. Setting MEMLEAVE is useful at sites that run memory-intensive applications.

If MEMSIZE= is not set explicitly in a configuration file or at SAS invocation, MEMLEAVE is set automatically to a value that is equal to the user's available region.

MEMSIZE=n | nK | nM
For Version 6, 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 that is required by the server. You should be aware that, in some cases, SAS terminates abnormally when it is unable to satisfy a memory request. The default is 0.

A change from Version 6 behavior, the desired effect of the MEMSIZE= option for Version 7 and Version 8 is to allocate extended storage. Extended storage is a small amount of a user's address space that is reserved for cleanup when SAS has used all available memory and abends. Rather than to assign an explicit value to MEMSIZE=, SAS automatically assigns to it the current value of MEMLEAVE.

You may continue to use the Version 6 implementation of MEMSIZE= and assign a value to it. Alternatively, you may use the Version 7 and Version 8 implementation instead.

For the Version 7 and Version 8 implementation, you can set the MEMSIZE= option at SAS invocation only. Do not set MEMSIZE= in a configuration file, in an OPTIONS statement, or in an AUTOEXEC file.

For the Version 6 implementation, you can use the following values with the MEMSIZE= option:

n
specifies a number from 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.

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

nM
specifies the number of megabytes, from 0 to 2048.

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 36M for the MEMSIZE= option to allow for peak usage periods.

VMCTLISA=value
specifies the size of the ISA (initial storage allocation) for SAS memory management and control blocks. This memory is critical to SAS software execution.

You should specify a VMCTLISA= value of 1536K to ensure that SAS memory management routines have sufficient memory for their control blocks.

VMPAISA=value
VMPAOSA=value
VMTAISA=value
VMTAOSA=value
specifies the size of the memory above the 16-Mb line.

VMPAISA specifies the size of the ISA for permanent memory above the 16-Mb line. VMPAOSA specifies the size of the OSA (overflow storage allocation) for permanent memory above the 16-Mb line.

VMTAISA specifies the size of the ISA for temporary memory above the 16-Mb line. VMTAOSA specifies the size of the OSA for temporary memory above the 16-Mb line.

The bulk of server memory is allocated above (A) the 16-Mb line. The initial storage allocation should be sizeable. Specify VMPAISA=7680K and VMTAISA=7680K to enable SAS software to satisfy many memory requests without incurring too much memory fragmentation. Secondary allocations (OSA) should be large enough to hold down the number of times that SAS software has to request more memory from the operating system but not so large that the requests fail due to memory fragmentation. Specify VMPAOSA=3072K and VMTAOSA=3072K.

VMPBISA=value
VMPBOSA=value
VMTBISA=value
VMTBOSA=value
specifies the size of memory below the 16-Mb line.

VMPBISA specifies the size of the ISA for permanent memory below the 16-Mb line. VMPBOSA specifies the size of the OSA for permanent memory below the 16-Mb line. VMTBISA specifies the size of the ISA for temporary memory below the 16-Mb line. VMTBOSA specifies the size of the OSA for temporary memory below the 16-Mb line.

The server uses relatively little memory below (B) the 16-Mb line. Specify VMPBISA=768K, VMPBOSA=384K, VMTBISA=96K, and VMTBOSA=96K.

These options can be specified in a SAS configuration file. A typical SAS configuration file entry follows:

vmctlisa=1536K
vmpaisa=7680K
vmpaosa=3072K
vmtaisa=7680K
vmtaosa=3072K
vmpbisa=768K
vmpbosa=384K
vmtbisa=96K
vmtbosa=96K
procleave=150K
sysleave=150K

The omission of the MEMSIZE= option from the configuration file implies that SAS sets the MEMLEAVE option to a value that is equal to the amount of a user's available region.

See SAS Companion for the OS/390 Environment for more information about these SAS system options.


Chapter Contents

Previous

Next

Top of Page

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