space
Previous Page | Next Page

Creating the SAS/SHARE Server Environment

z/OS: Creating the Server Environment


Starting a Server Using a Started Task

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

Note:   If you use the XMS access method, do not invoke SAS and create the server in a batch environment. Doing this might drain the batch initiator when the server execution ends. The address space (ASID) would not be usable.   [cautionend]

  1. To start the server, create a cataloged started task procedure that contains the JCL, as follows:

    Example JCL in the z/OS Started Task Procedure Library
    
    //SHRSTART  PROC ENTRY=entry,ID=id,SERVOPT=' ',UAPW=,OAPW=,OPTIONS=
    //SAS       EXEC PGM=&ENTRY,DYNAMNBR=50,REGION=40M,
    //          PARM='IS="%SHRMACS(SERVER);%STRTSRV(&ID',
    //          '%STR(&SERVOPT),%UAPW,%OAPW",&options')
    //STEPLIB   DD DISP=SHR,DSN=&prodfix.LIBRARY
    //CONFIG    DD DISP=SHR,DSN=&prodfix.CNTL(BATW0)
    //          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)
    //SASCLOG   DD SYSOUT=*   
    //SASSNAP   DD SYSOUT=*
    //SYSUDUMP  DD SYSOUT=*
    //SYSIN     DD DUMMY

    entry

    is the value that is specified for the ENTRY= parameter in the cataloged procedure that is used to invoke SAS from a batch job. This procedure was created when Base SAS was installed.

    ID=id

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

    SERVOPT=' '

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

    UAPW=uapw

    is the user-access password for the server.

    OAPW=oapw

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

  2. Notice that the PARM= parameter uses the macro STRTSRV to start a server. %STRTSRV is a standard SAS/SHARE autocall macro. For more information, see Using Macros for Server Library Access and STRTSRV Macro. Alternatively, you can use the SERVER macro to start a server. %SERVER executes faster than %STRTSRV. For more information, 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 SHRSTART

    The cataloged procedure name for the SAS/SHARE server is SHRSTART.

  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 SHRSTART,ID=server-ID

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

    START SHRSTART,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 SHRSTART,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 SHRSTART,ID=server-ID,SERVOPT='options'
                 UAPW=uapw,OAPW=oapw


Starting a Server Automatically


Using the Static Program Method

To use the static program method, store a SAS program that contains PROC SERVER in an external file. For information about writing a SAS program to start a server, see Managing a SAS/SHARE Server (Server Administrators). Invoke SAS 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 in 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 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 NE) %then
          %do;
             UAPW=&uapw
          %end;
     %if (&oapw NE) %then
          %do;
             OAPW=&oapw
          %end;
     ;
  run;
  endsas;
%MEND;


Setting SAS System Performance and Logging Options

The following options affect the operation of the server.

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

BUFNO=

specifies the number of buffers to use for SAS data sets. The default value is 1.

LOGPARM=

controls when SAS log files are opened and closed.

LOG=

specifies a file to which the SAS log is written when executing SAS programs outside the windowing environment.

MEMLEAVE=

specifies the amount of memory that is reserved for cleanup in the event of an abnormal termination of SAS.

MEMSIZE=

specifies the total amount of memory that SAS can use.

STAE

prevents a system abend exit when recoverable errors occur. STAE is the default.

SVC0SVC=
SVC0R15=

The SAS SVC Routine 0 is required for SAS/SHARE. 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.

SYNCHIO

specifies whether synchronous IO is enabled.

CAUTION:
Do not specify the SYNCHIO option.

The SYNCHIO option prevents SAS/SHARE servers from working properly. NOSYNCHIO is the default.  [cautionend]

VMCTLISA

specifies the size of the initial storage allocation (ISA) for SAS memory management and control blocks.

VMPAISA

specifies the size of the ISA for permanent memory above the 16-Mb line.

VMPAOSA

specifies the size of the overflow storage allocation (OSA) 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.

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.

For details, see information about system options in the SAS Companion for z/OS.

space
Previous Page | Next Page | Top of Page