SAS Institute. The Power to Know

Knowledge Base


TS-742

Alpha/OpenVMS OS Scheduler Configuration for SP3

 

Before You Start

 

You will need to have both a SAS 9.1.3 Metadata Server and SAS Management Console 9.1.3 running on your network. For information on starting and administering a SAS Metadata Server, see the SAS 9.1.3 Metadata Server: Setup and Administration Guide.  For information on using SAS Management Console see the SAS Management Console 9.1.3 User’s Guide.

 

Overview

  1. Set Up The Environment On Your Alpha Machine
  2. Define Your Application Server And Workspace Server
  3. Define Your Data Step Batch Server
  4. Define Your Operating System Scheduling Server
  5. Define Your Object Spawner
  6. Start Your Object Spawner
  7. Getting More Information

 

Step Details

 

Set Up The Environment On Your Alpha Machine

 

  1. Choose a location where you want the directory structure that will contain files and directories to support the OS scheduler to reside. 

o       Files that will get written here include SAS program files and SAS log files, as well as running flow log files and flow and job   command procedures.

o       Each scheduling server user will have their own subdirectory, but all users will initially be granted RWE access to the entire   structure.

o       You might choose a central location where it is safe to have protections set accordingly, or you might decide to locate this   environment under the home directory of each scheduling server user, so that only a single user will need RWE access.  If you do   the latter, steps 2-4 for setting up the environment on your Alpha machine will have to be performed for each user.

 

  1. Run the sas$root:[misc.base]SAS_OS_Sched_setup.com command procedure from the location chosen above. 

 

o       Set the version limit to 0 on all of the directories and subdirectories created by this command procedure. If you do not choose to   do this, then understand that if 2 or more instances of the same flow attempt to run simultaneously (for further information, see   General Information in the ALP Scheduling Documentation under the online help for Schedule Manager in the SAS Management   Console), then version limits may prevent the flow command procedure log from being created, which will prevent the flow   command procedure from running.

 

  1. Copy sas$root:[misc.base] Sched_WS_Srvrs_SASV9.CFG to the [SAS_OS_Sched] subdirectory created in step 1 above.

 

  1. Edit the config file, adding option values for the /METASERVER= and /METAPORT= options.  The METASERVER option value should be the IP address for the machine on which the SAS Metadata Server is running.  The METAPORT option value should be the TCP port that the metadata server is listening to for connections.  See the SAS Language Reference: Dictionary and SAS 9.1.3 Metadata Server: Setup and Administration Guide for further information on these SAS system options.

 

Define Your Application Server And Workspace Server

 

Using the SAS Management Console, you will need to define your servers to the metadata. To do this, you will use the Server Manager plugin.

  1. Highlight Server Manager. Using the right mouse button, select New Server...
  2. Under SAS Servers, select SAS Application Server
  3. Name: SASMain_Alpha (Description is optional.)
  4. Accept the default values for software versions.
  5. Select Workspace Server
  6. Select Basic Configuration
    • Authentication Domain: DefaultAuth
    • Host Name: IP Address Of Alpha Machine To Schedule To
    • Port: 8591
  7. Review settings and select Finish.

 

Edit the SAS Command for the Workspace Server

  1. Select "+" to expand the Server Manager node. Fully expand all three levels of SASMain_Alpha.
  2. Highlight the lowest level, SASMain_Alpha - Workspace Server. Using the right mouse button, select Properties.
  3. On the Options tab, in the Command field, replace the existing text with sas/config=<full path to [SAS_OS_Sched]>sched_ws_srvrs_sasv9.cfg/log=”<full path to [SAS_OS_Sched.WorkspaceServer.logs]>workspace_server_%Y_%m_%d_%H_%M_%s.log”/logparms=”rollover=session”, where sas should be replaced by your site’s SAS verb.
  4. Select OK to save changes.

 

Define Your Data Step Batch Server

 

Select the the top level of the SAS Application Server, SASMain_Alpha, created above.

 

  1. Using the right mouse button, select Add Application Server Component...
  2. Select SAS Data Step Batch Server
  3. Name: SASMain_Alpha - SAS Data Step Batch Server (Description is optional.)
  4. Enter server properties:
    • Associated Machine: IP Address Of Alpha Machine To Schedule To
    • Command Line: @sas$root:[misc.base]vmssas.com.
    • **Logs Directory: full path to the [SAS_OS_Sched.BatchServer.logs] subdirectory (set up by the SAS_OS_Sched_setup.com command procedure run earlier), or wherever you’d like logs from SAS programs run within scheduled flows to go.
    • Under Advanced Properties you may select a rolling log file format (see the logparm SAS system option documentation in the SAS Language Reference: Dictionary for details).  Note that if you specify dots in the format (other than the one that separates filename from filetype), they will be replaced by underscores when the job command line is executed.  Also note that if you wish to change this format from the default, case will not be differentiated for those directives that are valid as both upper and lower case – they will end up being all uppercase when the job command line is executed.  This could result in an unexpected log file name format.
  5. Review settings and select Finish.

 

Define Your Batch Job Deployment Directory

 

  1. Highlight Schedule Manager. Using the right mouse button, select Deployment Directories...
  2. With the SASMain_Alpha Application Server selected, select New.
  3. Enter directory properties:
    • Name: Batch Jobs
    • **Directory: Full path to the [SAS_OS_Sched.SASEnvironment.SASCode.Jobs] subdirectory (set up by the SAS_OS_Sched_setup.com command procedure run earlier), or wherever you’d like SAS data step programs that are run within scheduled flows to reside.
  4. Select OK to create the new directory definition.
  5. Select OK to save your changes.

 

Define Your Operating System Scheduling Server

 

Using the SAS Management Console, you will need to define your servers to the metadata. To do this, you will use the Server Manager plugin.

  1. Highlight Server Manager. Using the right mouse button, select New Server...
  2. Under Scheduling Servers, select Operating System Services
  3. Name: VMS Scheduling Server (Description is optional.)
  4. Enter server properties:
    • SubType: VMS.
    • **Control Directory: Full path to [SAS_OS_Sched.SchedulingServer.Flows] subdirectory (set up by the SAS_OS_Sched_setup.com command procedure run earlier), or wherever you’d like the [userid.flowname] subdirectory that will contain flow and job command procedures, as well as flow status logs, to go.
    • Command: sas/config=<full path to [SAS_OS_Sched]>sched_ws_srvrs_sasv9.cfg /log=”<full path to  [SAS_OS_Sched.SchedulingServer.logs] directory>scheduling_server_%Y_%m_%d_%H_%M_%s.log /logparm=”rollover=session”, where sas should be replaced by your site’s SAS verb.
  5. Enter connection properties:
    • Authentication Domain: DefaultAuth
    • Host Name: IP Address of Alpha Machine to Schedule To
    • Port: 8451
  6. Review settings and select Finish.

 

Define Your Object Spawner

 

The SAS Object Spawner is used to instantiate instances of server definitions upon request by client applications.

  1. Highlight Server Manager. Using the right mouse button, select New Server...
  2. Under SAS Servers - Spawners, select Object Spawner
  3. Name: VMS Object Spawner (Description is optional.).  Note that in order for the Object Spawner to find this definition when it reads the metadata, this name must match the sasSpawnercn option value in OMR_OBJSPAWN.COM (a command procedure used to invoke the Object Spawner – see the Start Your Object Spawner section).
  4. Accept the default values for software versions. For the Associated Machine, use the ip address of the Alpha machine on which the SAS Object Spawner is to run.
  5. Accept the default values for Operator Login and Log file.
  6. In the list of servers, move the following to the Selected list.
    • SASMain_Alpha - Workspace Server
    • VMS Scheduling Server
  7. Select Operator Connection.
  8. Enter connection properties
    • Authentication Domain: DefaultAuth
    • Host Name: IP Address Of Alpha Machine To Schedule To
    • Port: 8581
  9. Review settings and select Finish.

 

Start Your Object Spawner

 

  1. Prior to starting the SAS Object Spawner, you will need to create a Metadata Configuration File that contains information for accessing the SAS metadata server.  For more information about how to create this file, see the SAS 9.1.3 Integration Technologies Server Adminstrator’s Guide.  (OMRCONFIG.XML, a sample, is discussed below in step 2).

 

    • The spawner should run under an account that has the following authorized privileges.  These privileges are required in order for the spawner to create a detached process with the connecting client as the owner.  If the connecting client will always be the same userid as the one running the spawner, these privileges will not be needed.

 

READALL

IMPERSONATE

 

  1. Included as part of the Base SAS installation are some sample files that demonstrate how to start the daemon as a detached process. The files listed here are all located in sas$root:[misc.base]. It is recommended that you copy them to the [SAS_OS_Sched.ObjectSpawner] subdirectory and modify and execute them from there.

 

Executes OMR_OBJSPAWN.COM as a detached process.

 

    • OMR_OBJSPAWN.COM

Invokes the spawner.  Also includes other commands that your site might need in order to run the appropriate version of the spawner, to set the display node, to define a process level logical pointing to a template DCL file (see OBJSPAWN_TEMPLATE.COM description below), and perform any other actions needed before the spawner is started.

 

    • OBJSPAWN_TEMPLATE.COM

Performs setup that is needed in order for the spawned server process to execute.  If the SAS$TKELS_TEMPLATE logical is defined, then when a server process starts, the corresponding template file is immediately executed as a DCL command procedure. You are not required to define the template file logical, but if you do and the file does not exist, servers launched by the spawner will fail to start.

    • OMRCONFIG.XML

Provides a sample Metadata Configuration File for the spawner (see step 1).

 

Verify That the Object Spawner is Working Properly

 

  1. In the SAS Management Console, select "+" to expand the Server Manager node. Fully expand all three levels of SASMain_Alpha.
  2. Highlight the lowest level, SASMain_Alpha - Workspace Server.
  3. In the right hand view, you should see a single connection defined. Highlight that connection name, use the right mouse button and select Test Connection...
  4. Enter a valid Alpha user ID and password and select OK.
  5. You should see a Test Connection Successful message.

 

Getting More Information

 

There are a variety of information sources available to you.

 

** Important Note **

 

The default command for a job definition (when viewing a job definition in SMC Schedule Manager, see the Scheduling Details tab) has the following format:

 

@sas$root:[misc.base]vmssas -log <Batch Server Logs Directory Spec>/<SAS program filename>_#Y.#m.#d_#H.#M.#s.log -batch –noterminal -logparm "rollover=session"  -sysin <Batch Jobs Deployment Directory Spec>/<SAS program filename>

 

And the format for a flow submit command is as follows:

 

submit/restart/notify/noprint/log=<Scheduling Server Control Directory Spec.userid.flowname> <other options> <Scheduling Server Control Directory Spec.userid.flowname><flowname>.com

 

Unpredictable results may occur if either of these commands exceeds 256 characters.  For this reason, you should choose paths and filenames of moderate length when creating flow names and SAS program names, as well as when choosing directory specifications listed above and marked with ** in the Step Details section.  The SAS program file name length can be limited by deploying a job from the home directory of the userid that will be entered when scheduling the job – this is because of a current defect where the deployed SAS program file name is built using the full path.  I.e., sds$:[temp.ossched_via_smc.SAS_OS_Sched.SchedulingServer.Flows]etljob1.sas would be written to the Batch Jobs deployment directory as  sds$__temp^.ossched_via_smc^.SAS_OS_Sched^.SchedulingServer^.Flows_etljob1.sas.  If you deploy jobs from the scheduling server user’s home directory, you need not enter the full path to the .SAS file in the File box under Schedule Manager->Deploy a SAS Data Step Program.