Previous Page | Next Page

Maintaining Global Metadata

Scheduling Server Definitions

To have SAS/Warehouse Administrator schedule a Job, you must open the properties window for the Job and enter information on the Date/Time tab and the Server tab. The Server tab requires a scheduling server definition, as shown in the next display:

[untitled graphic]

A scheduling server definition is a metadata record that specifies

Scheduling server definitions are required if you want SAS/Warehouse Administrator to generate the code to schedule and track Jobs. At a minimum, in each Warehouse Environment, create a scheduling server definition for each host where scheduled Jobs will run. This typically includes the host where SAS/Warehouse Administrator is installed, as well as one or more remote hosts.


Preparing to Create Scheduling Server Definitions

Before you create a scheduling server definition, make the following preparations:


Example: Creating an AT Scheduling Server Definition

This example describes how to create a scheduling server definition for a local host that is running the Microsoft Windows or Windows NT operating system. Details are provided for a remote host running on one of these operating systems.

Note:   The steps for creating a CRON scheduling server definition are very similar.   [cautionend]


Preparing to Create an AT Scheduling Server Definition

In addition to the instructions given in Preparing to Create Scheduling Server Definitions, more preparation might be needed when the AT command is the scheduling server.

The properties window for a scheduling server definition is used to generate a command for a given scheduling server. For example, the Windows NT AT Server Properties window is used to generate an AT command that schedules a SAS/Warehouse Administrator Job.

Note:   The maximum length for an AT command is 129 characters.   [cautionend]

If the command generated from the metadata in the properties window is too long, you will get an error message that says that the maximum allowable length for an AT command has been exceeded. You will not be able to schedule the Job until this problem has been fixed. To fix this problem, you must shorten the command that is generated from the properties window by shortening pathnames or removing command options.


Define Server Properties

Display the Define Items Used Globally window, as described in Using the Define Items Used Globally Window.

In the Type panel of the Define Items Used Globally window, click the button beside Scheduling Servers. Click Add at the bottom left of the window. The Available Scheduling Servers window displays.

[untitled graphic]

For the current example, on the Available Scheduling Servers window, the Windows NT AT Command is selected. (You would select UNIX System V Cron to create a scheduling server definition for a host running a System V UNIX, and you would select Null Scheduler to generate a Job that could be used with a scheduling server other than AT or CRON.)

After you have selected the appropriate scheduling server, click OK. A Windows NT AT Server Properties window for the scheduling server displays for you to enter the appropriate information as follows:

Scheduler Name

specifies a display name for the scheduling server definition you are creating, such as local schedsvr .

[untitled graphic]

On the General tab, after you have entered a name (and perhaps a description), click the Directories tab. The fields on this tab are

Local Working Directory

specifies a directory that the scheduling server can use to store SYSIN, LOG, LIST, and temporary files that are generated for a Job on the SAS/Warehouse Administrator host.

Note:   For the AT command, keep the names of any working directories as short as possible to avoid generating a command that is too long for AT software to accept.  [cautionend]

[untitled graphic]

The current example is a scheduling server definition for a local host (SAS/Warehouse Administrator host). Accordingly, the Directories tab only specifies a local working directory: c:\job . If you were creating a scheduling server definition for a remote host, you would specify a working directory on the remote host as well. After specifying the appropriate working directories, click the Host tab. The fields on this tab are

Compute Host

specifies a definition for the host where the Job will be executed.

[untitled graphic]

The current example is a scheduling server definition for a local host. Accordingly, a local host definition (which happens to be named local ) is specified on the Host tab. If you were creating a scheduling server definition for a remote host, you would specify a remote host definition. After specifying the appropriate host definition, click the Command tab. The fields on this tab are

Command this server will use to start SAS jobs

specifies the command that the scheduling server application will use to start SAS, in order to execute the Job.

[untitled graphic]

When you first display the Command tab, a default command is provided. You might have to edit the default command to start SAS at your site.

Note:   Use the Command tab to specify a SAS start command only. Do not specify a script file on this tab.   [cautionend]

Note:   Do not specify a SAS config file, a SAS autoexec file, or any other options on the Command tab. Specify any SAS start command options on the Options tab.   [cautionend]

After specifying the appropriate start command, click the Options tab. The fields on this tab are

Generated Source Filename

specifies the name of the file generated by SAS/Warehouse Administrator for Jobs using this scheduling server definition. By default, a macro is provided in this field that sends the generated file to the local working directory specified on the Directories tab.

Sysin Filename

specifies the default location of the SAS source code to be used during batch mode execution of Jobs using this scheduling server definition. By default, a macro is provided in this field that specifies the Generated Source Filename as the Sysin Filename.

Log Filename

specifies the filename where you want SAS to write the LOG output. By default, a macro is provided in this field that sends the log to the local working directory specified on the Directories tab.

Print Filename

specifies the filename where you want the output of this Job to be written. By default, a macro is provided in this field that sends any output to the local working directory specified on the Directories tab.

Other Command Options

specify options for the SAS command entered on the Command tab.

[untitled graphic]

On the Options tab, all of the default macros are specified (&jobsrc., &jobsys., and so on). One way to shorten the AT command generated from the Windows NT AT Server Properties window is to omit values in the Log Filename and Print Filename fields, but that was not required in our example.

A SAS config file and SAS autoexec file with short filenames are specified in the Other Command Options field. These short filenames are another way to shorten the AT command generated from the properties window.

After specifying the appropriate command options, click the Tracking tab. The fields on this tab are

Enabled

adds the default job-tracking prolog and epilog to Jobs using this scheduling server definition unless this default is overridden by the tracking attribute for an individual Job.

Disabled

omits the default job-tracking prolog and epilog from Jobs using this scheduling server definition unless this default is overridden by the tracking attribute for an individual Job.

[untitled graphic]

For the current example, accept the default value on the Tracking tab: Enabled.

After specifying the appropriate metadata on the Tracking tab, you are finished entering metadata for the example scheduling server definition. Click OK. The new server definition is added to the list of server definitions in the Define Items Used Globally window.

After a scheduling server definition has been created, it can be used to schedule a Job, as described in Example: Scheduling and Tracking a Job with the AT Command.


Summary: Creating and Using a Null Scheduling Server Definition

The Available Scheduling Servers window includes a Null Scheduler option, as shown in the following display:

[untitled graphic]

Use the Null Scheduler option to create a scheduling server definition that will save a generated SAS Job as a .sas file in a specified directory, along with a command file to run that Job.

For example, suppose that you wanted to schedule a SAS/Warehouse Administrator Job that would execute on a mainframe computer. You could create a null scheduler definition and use it to schedule the Job. That is, you could define the Job in SAS/Warehouse Administrator, then schedule it, specifying a null scheduling server definition on the Server tab in the Job Properties window as follows:

[untitled graphic]

If you click Schedule on the Job Properties window, SAS/Warehouse Administrator will

After the command file for the Job has been generated, give it to the mainframe operator who is responsible for scheduling batch jobs. Keep in mind that the mainframe scheduling server would need access to the generated code for the Job, which is specified with the -SYSIN option in the command file.


Typical Uses for a Null Scheduler Definition

You can use a null scheduler definition to support the following scenarios:


Define Server Properties

Except for selecting Null Scheduler from the Available Scheduling Servers window, the steps for creating a null scheduler definition are similar to those described for the AT command in Define Server Properties.

Keep in mind that if a local host is specified in the null scheduler definition, the generated SAS Job and its command file will be sent to the directory specified in the Local Working Directory field on the Directories tab. If a remote host is specified, these files will be sent to the directory specified in the Remote Working Directory field.

Previous Page | Next Page | Top of Page