Scheduleug Unix Sas
Scheduleug Unix Sas
2
®
SAS® Documentation
The correct bibliographic citation for this manual is as follows: SAS Institute Inc. 2010. Scheduling in SAS® 9.2. Cary, NC: SAS Institute Inc.
Scheduling in SAS ® 9.2
Copyright © 2010, SAS Institute Inc., Cary, NC, USA
ISBN enter number here (electronic book)
All rights reserved. Produced in the United States of America.
For a hardcopy book: No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means,
electronic, mechanical, photocopying, or otherwise, without the prior written permission of the publisher, SAS Institute Inc.
For a Web download or e-book:Your use of this publication shall be governed by the terms established by the vendor at the time you acquire this
publication.
U.S. Government Restricted Rights Notice: Use, duplication, or disclosure of this software and related documentation by the U.S. government is
subject to the Agreement with SAS Institute and the restrictions set forth in FAR 52.227–19 Commercial Computer Software-Restricted Rights (June
1987).
SAS Institute Inc., SAS Campus Drive, Cary, North Carolina 27513.
1st printing, August 2010
SAS ® Publishing provides a complete selection of books and electronic products to help customers use SAS software to its fullest potential. For more
information about our e-books, e-learning products, CDs, and hard-copy books, visit the SAS Publishing Web site at support.sas.com/
publishing or call 1-800-727-3228.
SAS ® and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other
countries. ® indicates USA registration.
Other brand and product names are registered trademarks or trademarks of their respective companies.
Contents
Chapter 1 • SAS Scheduling Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
About SAS Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Overview of the Scheduling Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
About Scheduling Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
About Schedule Manager in SAS Management Console . . . . . . . . . . . . . . . . . . . . . . . . . 6
About Batch Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
About Scheduling Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Scheduling Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Chapter 1
SAS Scheduling Overview
2. A user set up to administer scheduling can use the Schedule Manager plug-in in SAS
Management Console to prepare the job for scheduling, or users can schedule jobs
directly from other SAS applications. The job is added to a flow, which can include
other jobs and events that must be met (such as the passage of a specific amount of time
or the creation of a specified file). The Schedule Manager also specifies which
scheduling server should be used to evaluate the conditions in the flow and which batch
Overview of the Scheduling Process 3
server should provide the command to run each job. The type of events you can define
depends on the type of scheduling server you choose. When the Schedule Manager has
defined all the conditions for the flow, the flow is sent to the scheduling server, which
retrieves the command that is needed to run each job from the designated batch server.
3. The scheduling server evaluates the conditions that are specified in the flow to
determine when to run a job. When the events specified in the flow for a job are met,
the scheduling server uses the command obtained from the appropriate batch server to
run the job. If you have set up a recurring scheduled flow, the flow remains on the
scheduling server and the events continue to be evaluated.
4 Chapter 1 • SAS Scheduling Overview
4. The scheduling server uses the specified command to run the job in the batch server,
and then the results are sent back to the scheduling server.
About Scheduling Servers 5
Note: This address is for documentation purposes only. The batch job executes on the
machine that is specified in the scheduling server's metadata.
• a command that runs in batch mode on the machine that is specified in the scheduling
server's metadata
The following types of batch servers are supported:
SAS Java Batch server
is used for scheduling Java applications that are supplied by SAS and that are invoked
and launched by the standard java.exe shell. This server definition is used for reports
that are created by applications such as SAS Web Report Studio and campaigns created
by SAS Marketing Automation. The subtype of the server specifies which Java
application is invoked (for example, the report subtype runs outputgen, and the
marketing automation subtype runs malauncher). Each SAS Java Batch server
instance provides the command for a single application, so if you need to schedule jobs
from multiple applications, you must configure a SAS Java Batch server for each
application (for example, one server for SAS Web Report Studio and one for SAS
Marketing Automation).
SAS DATA Step Batch server
is used for scheduling SAS programs that contain DATA step and procedure statements.
These programs include jobs that are created in and deployed from SAS Data
Integration Studio.
The metadata definition for a SAS DATA Step Batch Server must include a SAS start
command that will run in batch mode.
SAS Generic Batch server
is used for scheduling jobs from Java-based SAS applications that are not specifically
supported by the SAS Java Batch server types. If a SAS application adds support for
scheduling jobs before a new type of SAS Java Batch server has been created, you can
use the SAS generic batch server to provide a command to run jobs from the application.
scheduling, a DATA step job is generated and placed in this directory. When the job is
executed, the job information is read from this directory. The directory is also used when
deploying SAS DATA step programs for scheduling from the Schedule Manager.
In order for SAS Data Integration Studio users to deploy jobs, a metadata definition for the
deployment directory must exist in the metadata repository. The metadata definition
includes the following information:
• the name of the SAS Application Server with which the directory is associated
• a name for the directory
• the path to the directory (either fully qualified or a relative path from the application
server)
Chapter 2
Setting Up Scheduling Using
Platform Suite for SAS
Platform Flow Manager provides information about each flow's status and associated
dependencies. You can view or update the status of jobs within a flow, and you can run
or rerun a single job regardless of whether the job failed or completed successfully.
Platform Calendar Editor
is a scheduling client for a Process Manager Server. This client enables you to create
new calendar entries. You can use it to create custom versions of calendars that are
used to create time dependencies for jobs that are scheduled to run on the server.
Platform Load Sharing Facility (LSF)
handles the load balancing and execution of batch commands (which represent jobs).
Platform LSF manages and accelerates batch workload processing for computer- and
data-intensive applications. Process Manager Servers use Platform LSF for the
execution of the jobs within a flow. You must install Platform LSF on all SAS batch
servers as well as all other servers that will execute scheduled SAS jobs.
Platform Grid Management Services
manages jobs that are scheduled in a grid environment. This software collects
information on the jobs that are running on the grid and the nodes to which work has
been distributed. It makes the information available to the Grid Manager plug-in for
SAS Management Console. You can use Grid Manager to view and manage the grid
workload information.
If you install a Platform LSF on more than one machine in your network, you must use
SAS Grid Manager to configure scheduling. Refer to Grid Computing in SAS for more
information on configuring scheduling in a grid environment.
If you are using a multi-tier configuration with SAS Data Integration Studio (consisting of
a client tier, a middle tier running a Web application server, and a server tier) and you want
to schedule jobs from SAS Data Integration Studio as well as reports from SAS Web Report
Studio, you must install the Platform Process Manager server and SAS Business
Intelligence Report Services on the server tier.
If you are scheduling reports using SAS Web Report Studio, you must install the Platform
Process Manager on the same system as SAS Business Intelligence Report Services. By
default, SAS Business Intelligence Report Services is installed on the server tier. If you
want to install it on a different machine, you must use a custom installation plan. If you
use both SAS Web Report Studio and SAS Data Integration Studio, Platform Process
Manager and SAS Business Report Services must always be installed on the SAS
Application Server tier, which contains a SAS Workspace Server and an object spawner.
Defining Users
In order to schedule jobs using Platform Suite for SAS, users must be defined (in the
operating system of the server) and configured. The following table lists these users.
Installation Considerations
Install Platform Suite for SAS on the scheduling server, using the installation
documentation available in the readme.pdf file located in the Third Party area of your SAS
Software Depot or from http://support.sas.com/rnd/scalability/platform. The following
software will be installed:
• Platform Process Manager Server
• Platform Process Manager clients (Flow Manager and Calendar Editor)
• Platform LSF
Process Manager Server and Platform LSF must both be installed on the same machine.
Platform LSF can also be installed on additional machines to support grid configurations.
The Process Manager clients can be installed on any machine or machines.
When the Platform Process Manager Setup Wizard prompts for the owner of the Process
Manager Server, specify the LSF administrative user. For Windows installations, be sure
to specify the user's domain or, for local accounts, a dot (.) with the user ID.
When the installation process is complete, check to make sure that the following services
are running on the server, with the LSF administrative user as owner:
• LSF cluster name LIM
• LSF cluster name RES
• LSF cluster name SBD
• Process Manager
Note: For report scheduling to work, Platform LSF must be installed on the same machine
as SAS Business Intelligence Report Services.
Migration Considerations
If you install a version of Platform Suite for SAS on a different server than the previous
version was installed on, you must manually copy the Process Manager calendar metadata
to the new location. To copy the calendar metadata, install Platform Suite for SAS in the
new location and then follow these steps:
1. Log onto the old Process Manager server.
2. Change to the JS_TOP/work/calendar directory. JS_TOP corresponds to the
Platform Process Manager installation directory.
3. Copy all files except those ending in “sys” from this directory to the
JS_TOP/work/calendar directory on the new server.
Resolving Issues Related to Scheduling with Platform Suite for SAS 13
Note: You can also examine the contents of logs in the LSF directory.
From the new DOS command prompt, you can run the various scheduled commands that
are failing. If the commands succeed when they are entered at the prompt, this indicates
that there are some issues with the scheduling setup. If the commands fail, then additional
information might appear in the DOS command window to help you determine the problem.
14 Chapter 2 • Setting Up Scheduling Using Platform Suite for SAS
In a multi-user environment, in which more than one user is submitting and running flows,
the appropriate permission settings must be in place on certain folders. The Platform
scheduling server folders should already have the correct permissions set for the scheduler
service and administrator accounts and should need no further changes. Make sure that the
following files installed by LSF have the following permissions (LSF_TOP corresponds
to the LSF installation directory, such as C:\lsf_7.0):
Make sure that the files installed by Platform scheduling servers have the following
permissions (JS_TOP corresponds to the Platform Process Manager installation directory):
Table 2.3 Permissions for Files Installed by the Platform Scheduling Server
Platform Suite for SAS requires that the kernel be in 64-bit mode for its 64-bit applications.
Therefore, your kernel must be configured in 64-bit mode to use Platform scheduling
servers and Platform LSF. To determine whether your kernel is in 64-bit mode, use the
lsconf command. Here is an example of the command output that appears if your kernel
is in 32-bit mode:
$ lsconf -k
Kernel Type: 32-bit
To switch between the 32–bit and 64–bit kernels, an administrator must follow these steps:
1. Modify the /usr/lib/boot/unix directory and the /unix directory to be a
symbolic link to the library for the desired kernel.
2. Run the bosboot command to write a new system boot image.
3. Reboot the system.
Resolving SAS Exit Behavior When Using Platform Suite for SAS and
SAS Data Integration Studio
During the installation process, the SAS Deployment Wizard creates a script called
sasbatch in the following path:
SAS-config-dir\Lev1\SASApp\BatchServer
As a default, jobs that are deployed from SAS Data Integration Studio are run using this
script.
If you are not using this script, then the Platform scheduling server will report your SAS
jobs as completing with a status of Exit instead of Done. This situation occurs because
Platform scheduling servers treat any nonzero exit code as Exit instead of Done.
To resolve this issue, you can use the sasbatch script that was created by the SAS
Deployment Wizard. If you are using a different script, you can modify the script to prevent
the error in the following ways.
To use a job starter on Windows installations, modify your script as follows:
$APPSERVER_DIR$=D:\SAS\config\Lev1\SASMain
cd /D
D:\SAS\config\Lev1\SASMain
if not {%username%}=={} ( call sas.bat %*%
set rc=%ERRORLEVEL%
if %rc%==1 goto makenormalexit )
else ( call sas.bat -sasuser work %*%
set rc=%ERRORLEVEL%
if %rc
%==1 goto makenormalexit )
exit %rc
% :makenormalexit
exit 0
exit $rc
fi
Overview
Platform Process Manager works with IBM z/OS systems through file transfer protocol
(FTP) technology. Platform Process Manager uses FTP to submit a proxy job to the z/OS
system. You can then use FTP to monitor the progress of the job. To set up scheduling with
a z/OS system, you must verify that the JCL that is submitted with each job is correct for
your system.
You cannot suspend or resume jobs that run on z/OS systems.
Further Resources
For additional information about managing job submissions, see the white paper SAS
Scheduling: Getting the Most Out of Your Time and Resources at .
18 Chapter 2 • Setting Up Scheduling Using Platform Suite for SAS
19
Chapter 3
Setting Up Scheduling Using
Operating System Scheduling
operating system scheduling server or a Platform Process Manager server. However, there
are some limitations in the capabilities of operating system scheduling servers as compared
to a Process Manager server. You must use operating system commands instead of the
Flow Manager for operations such as stopping or deleting a scheduled flow.
Note: SAS Web Report Studio does not support operating system scheduling.
• UNIX:
“sasc-config-server/Lev1/SchedulingServer/schedulingserver.sh”
22 Chapter 3 • Setting Up Scheduling Using Operating System Scheduling
• z/OS:
sas-config-dir/Lev1/SchedlingServer/SchedulingServer.sh
The path must be a valid Windows path. Valid Windows paths include relative paths,
Universal Naming Convention (UNC) paths (for example \\server\volume\directory), and
mapped paths. If the path is invalid, or if it points to a file instead of a directory, then an
error message is written to the SAS log.
If you specify one of these triggers, then a script is created. However, the script is not
submitted for execution, and an error message similar to the following is written to the
log:
ERROR: One or more flows were not successfully scheduled.
ERROR: triggeroption is currently not supported for
intervaltype events on Windows systems
• Always test the command that is contained in a job before you schedule the job.
The user that scheduled the flow is also permitted to submit the flow manually.
Specify runonce if you want to run the flow just once, or specify start if you want
to resume a recurrence that was specified for the flow.
2. For each job that you want to cancel, type the following command at the USS prompt:
at -r at-jobid, where jobid is the first part of each line of the list of jobs (for example,
at -r 1116622800.a).
27
Chapter 4
Setting Up Scheduling Using SAS
In-Process Scheduling
scheduled jobs that can run simultaneously, specify the number in the SAS Web Report
Studio property wrs.scheduling.inProcess.maxSimultaneousJobs.
Setup Tasks
To set up an in-process scheduling server, install and deploy SAS Web Report Studio. The
installation and configuration procedure automatically installs and configures the in-
process server. While using the SAS Deployment Wizard, you must specify whether you
will use an in-process server or a Platform Computing server to schedule reports.
After you have installed SAS Web Report Studio and the in-process server, you must create
a metadata definition for the in-process server.
1. In SAS Management Console, right-click the Server Manager and select Actions ð
New Server.
2. On the first page of the New Server Wizard, under Scheduling Servers, select SAS In-
Process Services. Click Next.
3. In the following pages of the wizard, provide a name and description for the server and
then verify the server version.
4. On the final page, review the settings and click Finish.
You must define only a single in-process scheduling server. Using multiple servers will
cause errors when you attempt to schedule a report.
Chapter 5
Creating Batch Servers
When you finish the wizard, the server appears as a component under the selected SAS
application server.
Defining a SAS DATA Step Batch Server 33
When you finish the wizard, the server appears as a component under the selected SAS
application server.
during your initial installation and configuration. If you need to set them up manually,
follow these steps:
1. Create the physical deployment directory in the file system of the scheduling server
machine. Assign Write permission to this directory to the users who will be deploying
jobs for scheduling.
2. In SAS Management Console, right-click the Schedule Manager node and select
Deployment Directories.
3. In the Deployment Directories dialog box, select the application server (for example,
SASApp) that is associated with the scheduling server machine. Then click New.
4. In the New Directory dialog box:
a. Enter a name for the deployment directory (for example, Batch Jobs).
b. Enter the path for the deployment directory, or click Browse to navigate to the path.
You can enter either a fully qualified path, or a path that is relative to the application
server configuration directory (SAS-config-dir\Lev1\SASApp).
c. Click OK.
5. Click OK to exit the Deployment Directories dialog box.
7. When you finish the wizard, the server appears as a component under the selected SAS
application server.
36 Chapter 5 • Creating Batch Servers
37
Chapter 6
Scheduling Jobs Using Schedule
Manager
In order to use the Schedule Manager plug-in, your role must have the Schedule Manager
capability assigned under Management Console 9.2 capabilities.
Creating a Flow
In order to schedule a job, you must first create a job object, and then add it to a flow or
create a new flow. A deployed flow is a group of jobs and their dependencies that have
been deployed for scheduling.
To create a new flow,
1. From the navigation tree, select the Schedule Manager plug-in, and then select New
Flow from the Actions menu, the pop-up menu, or the toolbar. The New Flow window
appears.
Specifying Dependencies 39
2. In the New Flow window, provide a name and location for the flow. Then select the
scheduling server and the jobs that the flow should contain. The drop-down list for the
Scheduling Server field lists all of the defined scheduling servers. Select the server
that you want to use to run the current flow.
The Available Items field lists all of the jobs that have been defined and deployed for
scheduling. Select a job and use the arrows to move the job to the Selected Items list
to include it in the flow.
Note: Flows stored in project repositories are not visible in the Folders view in SAS
Management Console. Flows scheduled using an in-process scheduling server
cannot be scheduled using Schedule Manager. They must be scheduled from within
the SAS application (such as SAS Web Report Studio).
3. Click OK to close the window and create the flow.
Specifying Dependencies
Overview of Dependencies
After you have created a flow, you can specify dependencies for the flow. Without
dependencies, all of the jobs in the flow run immediately and simultaneously. Dependencies
let you specify the conditions that must be met before a job in a flow runs.
40 Chapter 6 • Scheduling Jobs Using Schedule Manager
To create dependencies, you can use either the visual flow editor or the standard interface.
The dashed lines identify the relationship between a job and a dependency. You can
select and move any element in the window. To connect elements in the window, move
the cursor to an open end of the element and drag the line to another element. Inputs
are on the left side of an element and outputs are on the right side.
2. Add a file event, a time event, a deployed job, or a subflow to the flow by selecting the
appropriate choice from the Actions menu, the toolbar, or the context menu. When file
events and time events are added, they are not associated as a dependency with any job.
You must incorporate the event into the flow in order for the event to function.
Specifying Dependencies 41
3. Add a gate node to the flow by selecting Actions ð Add Gate. The Add a Gate Node
dialog box appears. A gate node specifies a condition where a job runs when either one
or more specified conditions occur or all specified conditions occur. Select the type of
gate you want to use and click OK. The node appears in the editor, but is not identified
with any jobs.
4. To specify the input for a gate, move the cursor to the open end of a job or event and
drag the dashed line to the input for the gate. When you connect a job to a gate, the
New Job Event dialog box appears, where you can specify the condition for the event.
To specify the output for the gate, move the cursor to the output end of the gate and
drag the line to the input for the job.
5. Add a subflow by selecting Actions ð Add Subflow. The Add Subflow dialog box
appears. Select a flow that you want to include as a subflow in your flow and click OK.
The subflow appears in the editor as a job event. You can specify the subflow as a job
event dependency for a job in the flow or add it as an input for a gate node.
6. SelectActions ð Save Flow to save the flow and leave the visual editor open. Select
Actions ð Close Flow to save the flow and close the visual editor. Select Actions ð
Schedule Flow to save and schedule the flow on the selected scheduling server.
42 Chapter 6 • Scheduling Jobs Using Schedule Manager
2. The Dependencies window lets you specify time dependencies (the job runs at a
specified time or day), job dependencies (the job runs based on another job in the same
flow), and file dependencies (the job runs based on conditions associated with a
specified file). You can also specify whether the job runs only when certain
dependencies are met, or if all dependencies must be met.
Specifying Dependencies 43
3. Click New next to the Time dependencies list to define a new time dependency. A
time dependency specifies that the job runs on a specified day at a specified time.
In the New Time Event dialog box, select the type of recurrence (if any) and then specify
the interval between runs, and the dates and times when the jobs run. Click OK when
you have finished defining the event.
If you are using a Platform Computing scheduling server and have not selected the
Define time events in a server-independent format option (on the Options window
for Schedule Manager), the New Time Event dialog box uses a different format.
In this version of the New Time Event dialog box, you must first select the calendar
from the Calendar name drop-down list. The calendar identifies the days for the
dependency. Refer to the online Help for the Schedule Manager plug–in for more
information.
44 Chapter 6 • Scheduling Jobs Using Schedule Manager
After you specify the calendar, use the Hours and Minutes fields to specify the time
at which the job runs. Specify how long the job is active in the Duration of event field.
This field specifies the number of minutes after the specified time has been reached
that the dependency remains active (for example, when the job should start at a certain
time but has to wait for the completion of a file event). Click OK when you have finished
defining the event.
4. Click New next to the Job dependencies list to define a job dependency. A job
dependency specifies that the current job runs if a specified event occurs with another
job. For example, you can specify that the current job runs when Job A completes
successfully, or you can specify that it runs when Job A ends with a specified exit code.
In the New Job Event window, select the job that the current job is dependent on from
the Jobs drop-down list, and then select the event that is part of the dependency from
the Event Type drop-down list (such as successful completion, ending with a specified
exit code, or failing to start). Some event types require you to specify additional
information (such as an exit code or a run time) that is part of the dependency. Not all
event types are supported on all scheduling server types. Click OK when you have
finished defining the dependency.
5. Click New next to the File dependencies list to define a file dependency. A file
dependency specifies that the current job runs if a condition is met on a specified file.
For example, you can specify that the current job runs whenever File B is created, or
that it runs when File B becomes larger than a specified size.
Setting Deployed Flow Properties 45
In the New File Event window, specify the file (in Windows, you must specify the full
path) upon which the job is dependent in the File name field and the file state that must
exist in the Condition field (such as that the file exists, that the file is a specified size,
or that the file is beyond a certain age). Not all file event types are supported on all
scheduling server types. Click OK when you have finished defining the dependency.
6. When you have finished defining dependencies for the selected job, click OK in the
Dependencies window.
The Properties window for a flow also lets you specify options for the flow. The Attributes
tab enables you to specify the condition for the flow to be considered as completed, the
default queue on the scheduling server for the flow, and any e-mail notifications you should
receive based on the condition of the flow. The attributes available depend on the type of
scheduling server associated with the deployed flow.
The Dependencies tab contains a table of all the dependencies in the flow and their
relationships to the jobs in the flow.
Deleting Jobs and Flows 47
4. If you specify that you want to remove the job from all flows, you can also specify
whether the job should remain available for scheduling. If it remains available, you can
include the job in other flows. Otherwise, the job is removed entirely and cannot be
scheduled.
To delete a flow that has not been scheduled or that has been scheduled using a Platform
Process Manager scheduling server, select the flow in the navigation area and select Delete
from the context menu or the Edit menu.
To delete a flow that has been scheduled using an operating system scheduling server, you
must first manually cancel the flow. See “Setting Up Scheduling Using Operating System
Scheduling” on page 19 for information on canceling flows. After the flow has been
canceled, you can delete the flow in the Schedule Manager.
Scheduling Flows
After you have created a deployed flow and defined dependencies for the jobs in the flow,
you can schedule the flow to run. Scheduled deployed flows are sent to the scheduling
server, where the dependencies are evaluated. You can specify that a selected deployed
flow is scheduled to run according to a specified trigger.
To schedule a deployed flow,
1. From the navigation tree in SAS Management Console, select the Schedule Manager
and select the deployed flow you want to schedule. Select Schedule Flow from the
pop-up menu, the toolbar, or the Actions menu. The Schedule Flow window appears.
Display 6.1 Schedule Flow Window
2. Select the condition under which the flow should run from the Trigger drop-down list.
Valid values are as follows:
Run Now
specifies that the flow is sent to the scheduling server, which evaluates any
dependencies and immediately submits the jobs in the flow to be executed by the
scheduling server one time only. This option is useful for testing purposes.
Manually in Flow Manager
specifies that the flow is sent to the scheduling server, which evaluates any
dependencies but does not run the jobs in the deployed flow. The flow is held until
the jobs are run manually, either with the Flow Manager application (for Platform
Process Manager scheduling servers) or operating system commands (for operating
system scheduling servers).
<selected dependency>
specifies that a defined dependency for the flow is a trigger for the deployed flow.
The dependency is defined only for the flow. A flow that uses a dependency as a
trigger runs each time the conditions for the dependency are met. To define a new
time or file dependency as a trigger for the flow. click Options. This option is useful
for scheduling flows for production.
Scheduling Flows 49
3. If you scheduled the flow on a Platform Process Manager scheduling server, you can
use the Flow Manager application to view the history of a deployed flow or job, rerun
a flow or job, or stop a flow from running. If you scheduled the job on an operating
system scheduling server, you can use operating system commands to manage the
deployed flow. See the Help for the Schedule Manager for more information.
50 Chapter 6 • Scheduling Jobs Using Schedule Manager
51
Chapter 7
Scheduling Jobs from SAS Data
Integration Studio
If you are using an operating system scheduling server, then the operating system
submits the job at the designated time. Administrators can use operating system tools
to view the status of all scheduled flows. Users who are not administrators can view
and edit only the flows that they own.
SAS Data Integration Studio generates SAS code from the job metadata, transfers the file
to the deployment directory location on the scheduling server, and creates job metadata for
the Schedule Manager to use.
For information on using Schedule Manager to schedule a job, see “Scheduling Jobs Using
Schedule Manager” on page 37 .
Chapter 8
Enabling the Scheduling of
Reports
3. Jobs and flows are automatically created when the report is scheduled in SAS Web
Report Studio. Users can use the Schedule Manager in SAS Management Console to
reschedule the flow and change the report schedule.
4. Depending on the scheduling server used, either the Platform Process Manager server
submits the job for execution or the in-process scheduling server submits the job to
SAS Web Report Studio for execution at the designated time (or after the designated
dependent event).
5. The Batch Generation Tool, running on the scheduling server, executes the report and
places the output in the location designated by the repository (the WebDAV server or
the file system). Metadata about the report output is stored in the metadata repository.
If you are scheduling using Platform Suite for SAS, information about the job status is
stored on the Process Manager Server. Administrators can use Platform Flow Manager
to view the status of the job.
If report distribution has been set up, then the report output is also sent to the appropriate
destinations when the user bursts the report. For information about report distribution,
see “Scheduling and Distributing Pre-generated Reports” in the SAS® 9.2 Intelligence
Platform: Web Application Administration Guide.
6. Users can view the static output by using SAS Web Report Studio (or another
application, such as the SAS Information Delivery Portal).
To schedule reports, you must install and configure Platform Suite for SAS or configure a
SAS in-process scheduling server.
Overview of Tasks
To enable users to use the report scheduling capabilities of SAS Web Report Studio with
in-process scheduling, several setup tasks are required. If you implemented scheduling
when you installed SAS Web Report Studio, all setup tasks were performed automatically.
If you implement scheduling after installation is complete, you must complete these setup
tasks:
1. Verify or define a SAS Java Batch Server with a subtype of Reporting and a SAS In-
Process Services Server.
2. Identify the scheduling server type to SAS Web Report Studio.
3. Define archive paths for publishing reports to channels.
4. Test the configuration.
You might also need to update permissions on the physical folder to allow access for the
users who will be publishing reports. For information about setting up publication channels,
see “Adding SAS Publication Channels” in the SAS® 9.2 Intelligence Platform: Web
Application Administration Guide.
58 Chapter 8 • Enabling the Scheduling of Reports
If this message appears, then a batch copy of the report is displayed and the
configuration is correct.
The scheduling software must be installed on the same machine as the commands it
executes. For SAS Web Report Studio, this is the location where the Output Generation
Tool is installed.
User ID Purpose
lsfuser (suggested name) Used by Web Report Studio to connect to Platform Suite for SAS
and to run the Output Generation Tool, which creates scheduled
reports in batch mode. This user is sometimes referred to as the
scheduling user.
sastrust@saspw Used by the Output Generation Tool to obtain user credentials from
the metadata server. In a default installation, this user already exists
in the metadata repository.
sassrv Used by SAS Web Report Studio to perform the nightly cleanup of
partially deleted jobs. In a default installation, this user already
exists in the metadata repository.
Ensure That Metadata Logins Exist for Users Who Will Schedule
Reports
For each user who will use SAS Web Report Studio to schedule reports, a login (including
a password) must exist in the metadata repository.
To add a login for a user,
1. While you are logged on to SAS Management Console as the SAS Administrator, select
User Manager. A list of users and groups appears in the right pane.
2. Right-click the user to whose login you want to add a password, and select
Properties.
60 Chapter 8 • Enabling the Scheduling of Reports
3. In the Properties dialog box, select the Logins tab. Then right-click the login to which
you want to add a password, and click Modify.
4. In the Edit Login Properties dialog box, enter the user's password in the Password and
Confirm Password boxes. Then click OK.
5. Click OK in the Properties dialog box.
Users can manage their own passwords by using the SAS Login Manager.
Step 2: Verify That a SAS Java Batch Server Has Been Defined
A SAS Java Batch Server must be defined as a component of your SAS Application Server.
This server is set up automatically by the SAS Deployment Wizard.
To create the server manually, follow the instructions in “Defining a SAS Java Batch
Server” on page 32 . When defining the server, you must specify the following information:
• In the Associated Machine field, you must choose a machine that has Platform LSF
and SAS Business Intelligence Report Services installed.
• In the SubType field, you must select a value of Reporting.
• In the Command Line box, enter a command that contains the following
components:
“path-to-outputgen-executable”
The fully qualified path to the outputgen executable file, enclosed in quotation
marks.
--spring-xml-filespring-file-location
The fully qualified path to the spring.xml file, which provides configuration
services information to enable outputgen to connect to the SAS Metadata Server.
This component must be preceded by two dashes (- -).
--repositorymetadata-repository
The name of the repository that contains the job definitions. This component must
be preceded by two dashes (- -)
Here are examples of valid commands:
Windows example
C:\SAS\Config92\Lev1\ReportBatch\rptbatch.bat --spring-
xml-file C:\SAS\Config92\Lev1\Web\Applications\
SASBIReportServices4.2\spring.xml --repository Foundation
Note: Enter the command with no line breaks, and be sure to put quotation marks
around the arguments as shown in the example. If you copy and paste the command,
be sure to include a space after outputgen.exe. You can verify the command
by pasting it into a DOS command window. The command should execute with no
errors. (You can ignore Missing option messages, unless they pertain to the
--config-file option or the --repository option.)
UNIX example
usr/local/Config92/Lev1/ReportBatch/rptbatch.sh --spring-
xml-file usr/local/Config92/Lev1/Web/Applications/
SASBIReportServices4.2/spring.xml --repository Foundation
Note: Enter the command with no line breaks. If you copy and paste the command, be
sure to include a space after outputgen. You can verify the command by pasting
or typing it into a Telnet window. The command should execute with no errors.
Enabling Report Scheduling with Platform Suite for SAS 61
(You can ignore Missing option messages, unless they pertain to the --
repository option.)
CAUTION:
If you have a SAS Java Batch Server that was defined for a release before SAS
Web Report Studio 3.1, then create a new definition, reschedule the reports on
the new server, and delete the old definition.
4. In the Members tab, add the trusted user (SAS Trust User) as a member of the
LSFServicesGroup.
Alternatively, you can add the credentials directly to the SAS Web Report Studio
properties. Although this procedure is somewhat less complex, it does have the
disadvantage of having credentials in a publicly readable area. To modify the properties,
follow these steps:
1. Start SAS Management Console and connect to the metadata server using the
credentials of the user who installed the software on this host.
2. Expand the Application Management node. Under that node, expand the
Configuration Manager node.
3. Right-click the Web Report Studio node, and select Properties.
4. In the Properties dialog box, select the Advanced tab.
5. In the list of properties in the Advanced tab, look at the value of the
wrs.scheduling.LSFSchedulingServerUID property (or add the property if it does
not exist). If the Property Value column does not contain the user ID lsfuser, enter
that user ID in the Property Value field. On Windows systems, the ID must be qualified
with a domain or machine name.
6. For the wrs.scheduling.LSFSchedulingServerPW property, enter the password for
lsfuser (if the password is not already present) in the Property Value field. Add the
property if it does not exist. You can use a password that is encoded by SAS.
7. Click OK to close the Properties dialog box.
8. If you have edited the configuration information, you must restart SAS Web Report
Studio.
Step 7: Edit the Initialization File for the Output Generation Tool
(Windows Only)
On Windows systems, you must edit the initialization file for the Output Generation Tool
to specify the directory location of the logs that are created when a scheduled report is
executed. Complete the following steps:
1. Open the outputgen.ini file in a text editor. The file is located in the installation
directory for SAS Business Intelligence Report Services.
2. Locate the line that starts with this code:
applogloc=
3. After the equal sign, enter the path to the directory in which you want the tool to create
the log file. This should be the same directory that you created in “Step 6: Verify
Logging for the Output Generation Tool” on page 63 .
4. Save your changes.
7. In the Path box, specify the path to a network location that all users who will be creating
content can write to.
8. Click OK.
You might also need to update permissions on the physical folder to allow access for the
users who will be publishing reports. For information about setting up publication channels,
see “Adding SAS Publication Channels” in the SAS® 9.2 Intelligence Platform: Web
Application Administration Guide.
C:\Program Files\SAS9.2\SASBIReportServices\4.2\logs
For a default UNIX installation, the path is as follows:
SAS-config-dir/levx/Applications/SASBIReportServices42/logs
If no logs are present in this path, check to make sure that you have completed these tasks:
• created a logs directory, and assigned the appropriate user rights to the directory. See
“Step 6: Verify Logging for the Output Generation Tool” on page 63 .
• verified that the applogloc statement in the outputgen.ini file is correct. See
“Step 7: Edit the Initialization File for the Output Generation Tool (Windows Only)”
on page 63 .
• accurately entered the command in the Command Line field when you defined the
SAS Java Batch Server in SAS Management Console. See “Step 2: Verify That a SAS
Java Batch Server Has Been Defined” on page 60 .
Make sure that quotation marks appear around the arguments, as shown in the example.
If you copied and pasted the command, make sure that a space appears after
outputgen.exe.
On Windows systems, you can verify the command by pasting it into a DOS command
window. The command should execute with no errors.
If logs are present in the path, then check for the following error messages:
An error occurred: Unable to login user. Cause: Access denied.
or Caused by: com.sas.iom.SASIOMDefs.GenericError: Error
authenticating user SAS Trusted User in function LogonUser.
Make sure that the user ID and password for the SAS Trusted User (sastrust) are
specified correctly in the OutputManagementConfigTemplate.xml file. You
might need to remove the domain, or make sure that the domain is followed by a forward
slash (/) rather than a backward slash (\).
An error occurred: Exception while rendering report in batch.
Cause: cxp.002.ex.msg: The connection factory requires an
identity for the authentication domain "DefaultAuth", but the
user context provided for user "SAS Demo User" does not have any
identities for that domain. Therefore, the user cannot be
authorized to use the connection factory.
Make sure that the SAS Web Report Studio user who is trying to schedule the report
has a login (including a password) in the metadata repository. See “Ensure That
Metadata Logins Exist for Users Who Will Schedule Reports ” on page 59 .
For additional troubleshooting information, see “Resolving Issues Related to Scheduling
with Platform Suite for SAS” on page 13 .
66 Chapter 8 • Enabling the Scheduling of Reports
67
Chapter 9
Scheduling Jobs from SAS
Marketing Automation
Index
A adding jobs to 45
administration rights, local 20 setting properties 45
AIX scheduling issues 14 deploying jobs
archive paths SAS Data Integration Studio 52
defining 57 SAS Marketing Automation 69
defining for publishing reports to deployment directory 52
channels 63 deployment directory definitions 7, 33
directory permissions 21
B
batch servers 2, 6, 31 E
error messages 13
exit behavior 15
C
canceling scheduled flows
UNIX 24 F
Windows 23 file event dependencies 38
z/OS 26 file permissions 14
canceling scheduled jobs Load Sharing Facility (LSF) 14
in z/OS under Windows 16 operating system scheduling servers 21
channels scheduling servers 14
publishing reports to 63 flow metadata 8
configuration flows
Platform Suite for SAS 10 adding jobs to deployed flows 45
SAS Web Report Studio, for report canceling on UNIX 24
scheduling 61 canceling on Windows 23
scheduling on z/OS 16 canceling on Z/OS 26
testing, for report scheduling 58, 64 creating 38
troubleshooting, for report scheduling deleting 47
64 scheduling 48
setting deployed flow properties 45
submitting on UNIX 24
D submitting on Windows 23
dependencies 37 submitting on z/OS 26
file event 38
job event 38
specifying 39 G
specifying with standard interface 42 groups
specifying with visual flow editor 40 creating 59
time event 38
deployed flows
72 Index
I defining 21
in-process scheduling servers 6, 27 directory and file permissions 21
enabling report scheduling 58 local administration rights 20
limitations of 27 summary of setup tasks 20
setup tasks 28 UNIX 25
using 29 Windows 23
initialization file z/OS 26
for Output Generation Tool 63 operating system user accounts 59
installation Output Generation Tool
considerations for 12 editing initialization file 63
Platform Suite for SAS 10 logging for 63
J P
job event dependencies 38 password file 62
job metadata 8 permissions
job scheduling 37 directory and file permissions 21
adding jobs to deployed flows 45 for files installed by LSF 14
creating flows 38 for files installed by scheduling servers
deleting jobs and flows 47 14
dependencies 39 Platform Calendar Editor 10
Schedule Manager for 37 Platform Flow Manager 9
scheduling flows 48 checking error messages 13
setting deployed flow properties 45 Platform Grid Management Services 10
jobs Platform Load Sharing Facility (LSF) 10
adding to deployed flows 45 file permissions 14
canceling, in z/OS under Windows 16 Platform Process Manager server 5
deleting 47 Platform Suite for SAS 9
deploying for SAS Data Integration AIX issues 14
Studio 52 configuring 10
scheduling from SAS Data Integration enabling report scheduling 58
Studio 51 error messages 13
exit behavior 15
installation considerations 12
L installing 10
Load Sharing Facility (LSF) 10 issues related to scheduling with 15
file permissions 14 migration considerations 12
local administration rights 20 Windows issues 13
logging with z/OS 16
for Output Generation Tool 63 Process Manager server 9
logins 59 publishing reports to channels 63
LSF password file 62
R
M report scheduling 55
metadata, scheduling 8 enabling with in-process scheduling 58
deployment directory definitions 7 enabling with Platform Suite for SAS 58
job and flow metadata 8 metadata logins for users 59
metadata logins 59 publishing reports to channels 63
migration 12 testing the configuration 58, 64
troubleshooting the configuration 64
user IDs for 59
O
operating system scheduling servers 5, 19
assigning to a spawner 22 S
capabilities and limitations of 20 SAS applications 1
Index 73