|SAS/SHARE User's Guide|
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.
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
To use %SERVER instead of %STRTSRV in the PARM= parameter, change the EXEC statement as follows:
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.
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.
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.
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:
You should specify a VMCTLISA= value of 1536K to ensure that SAS memory management routines have sufficient memory for their control blocks.
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 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.
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.