46
Viewing or Updating Stored Process Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
About Deploying Jobs as Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Prerequisites for Web Service Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
For Administrators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
For Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Requirements for Web Service Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Creating a Web Service Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Deploying a Web Service Job as a Stored Process . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Deploying a Stored Process as a Web Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
About Deploying Jobs
In a production environment, SAS Data Integration Studio jobs must often be executed
outside of SAS Data Integration Studio. For example, a job might have to be scheduled
to run at a specified time, or a job might have to be made available as a stored process.
Accordingly, SAS Data Integration Studio enables you to do the following tasks:
• Deploy a job for scheduling; see “About Deploying Jobs for Scheduling” on page
221.
• Deploy a job as a SAS stored process; see “About Deploying Jobs as Stored
Processes” on page 229.
• Deploy a job as a SAS stored process that can be accessed by a Web service client;
see “About Deploying Jobs as Web Services” on page 235.
You can also deploy a job in order to accomplish the following tasks:
• Divide a complex process flow into a set of smaller flows that are joined together
and can be executed in a particular sequence; see “Using Scheduling to Handle
Complex Process Flows” on page 227. Alternatively, you can drop jobs into other
jobs, and build up complexity that way as well. For example, you could build an
outer job that contains inner jobs. You might find that these nested jobs provide a
more direct and efficient solution to the problem of creating and scheduling complex
process flows. This approach does not require separate deployment steps. For more
information, see “Creating a Job That Contains Jobs” on page 146.
• Execute a job on a remote host; see “Using Deploy for Scheduling to Execute Jobs
on a Remote Host” on page 228. Alternatively, you can save the SAS code
generated by the job to a file, and then manually move that file to the remote host.
220
Chapter 10 0 • • Deploying Jobs
31
Note: Under change management, only administrators can deploy jobs.
About Deploying Jobs for Scheduling
You can select a job in the Inventory tree or the Folders tree and deploy it for
scheduling. Code is generated for the job, and the code is saved to a file in a source
repository. Metadata about the deployed job is saved to the current metadata server. The
user or administrator responsible for scheduling jobs can use the appropriate software to
schedule the job for execution.
Here are some of the main tasks that are associated with deploying a job for scheduling:
• “Deploying Jobs for Scheduling” on page 221
• “Redeploying Jobs for Scheduling” on page 226
• “Using a Command Line to Deploy Jobs” on page 223
• “Using Scheduling to Handle Complex Process Flows” on page 227
See also “Prerequisites for Deploying a Job for Scheduling” on page 221.
Prerequisites for Deploying a Job for Scheduling
Administrators must install and configure a SAS Workspace Server for deploying jobs
for scheduling. For more information, see Scheduling in SAS. The administrator then
tells SAS Data Integration Studio users which server and deployment directory to select
when deploying jobs for scheduling.
Deploying Jobs for Scheduling
Problem
You want to schedule a SAS Data Integration Studio job to run in batch mode at a
specified date and time.
Solution
Scheduling a job is a two-stage process:
• Use SAS Data Integration Studio to deploy the job for scheduling. See “Deploy a Job
for Scheduling” on page 222.
• Use other software to schedule the job for execution. For more information, see
Scheduling in SAS. For information about scheduling prerequisites, see
“Prerequisites for Deploying a Job for Scheduling” on page 221.
Deploying Jobs for Scheduling
221
C# TIFF: C#.NET Code to Convert JPEG Images to TIFF XDoc.Tiff for .NET, which can be stably integrated into C#.NET string[] imagePaths = { @"C:\demo1.jpg", @"C:\demo2.jpg", @"C:\demo3.jpg" }; // Construct List
convert multiple pdf to jpg online; convert pdf to jpg file
33
Tasks
Deploy a Job for Scheduling
Perform the following steps to deploy a job for scheduling:
1. Right-click the job that you want to deploy. Then, select Scheduling
ð
Deploy in
the pop-up menu to access the Deploy for a job for scheduling window. The
following display shows the window if you select only one job for deployment.
Display 10.1 1 Deploy for a Job for Scheduling Window for a Single Job
By default, the deployed job file (in this case, Extract Balances Job.sas) is named
after the selected job. The following display shows the Deploy for a job for
scheduling window used to deploy multiple jobs for scheduling.
Display 10.2 2 Deploy for Scheduling Window for Multiple Jobs
2. When you deploy more than one job, a separate SAS file is created for each job that
you select. Each deployed job file is named after the corresponding job.
3. In the Batch Server field, accept the default server or select the server that is used to
store the SAS file for the selected job. The next step is to select the job deployment
directory. One or more job deployment directories (source repositories) were defined
for the selected server when the metadata for that server was created.
4. Check the Deployment Directory field to ensure that the deployed job is stored in
the appropriate directory. If the wrong directory is displayed, select another director
from the drop-down list, or click New to create a new directory if you have
permission to create directories on the server.
5. If you selected one job, you can edit the default name of the file that contains the
generated code for the selected job in the Deployed Job Name field of the Deploy
for a job for scheduling window. The name must be unique in the context of the
directory specified in the Deployment Directory field.
6. To deploy the job or jobs, click OK.
Code is generated for the selected job or jobs and is saved to the directory that is
specified in the Deployment Directory field. Metadata about the deployed jobs is saved
to the current SAS Metadata Server. A status window is displayed and indicates whether
222
Chapter 10 0 • • Deploying Jobs
39
the deployment was successful. In the Inventory tree, metadata for the deployed job is
added to the Deployed job folder. This job is now available for scheduling.
Using a Command Line to Deploy Jobs
Problem
You want to deploy jobs in batch mode.
Solution
You can use the command-line deployment tool. This tool enables you run an Ant script
to deploy many jobs at once through a simple command-line interface. You can create a
manifest file containing one or more paths and pass that file into the deployment script
along with the appropriate parameters. Use other software to schedule the job for
execution. For more information, see Scheduling in SAS.
Perform the following tasks:
• “Review the Prerequisites” on page 223
• “Prepare for Windows Deployment” on page 225
• “Prepare for Other Operating System Deployments” on page 225
• “Prepare the Manifest” on page 225
• “Run the Script” on page 226
Note: You cannot use a command line to deploy a job that resides on a z/OS system.
Also, the batch deployment feature does not work when the host name contains a
dash (-) character.
Tasks
Review the Prerequisites
In order to use the command-line tool to deploy jobs, you must meet the prerequisites
described in “Prerequisites for Deploying a Job for Scheduling” on page 221. You must
also gather server addresses, passwords, and other information that you will need.
For example, you should review the installation properties listed in the following table
Table 10.1 1 Installation Properties
Property
Value
-InstallRoot
C:\Program Files\SASHome
-PlatformVJR
${InstallRoot}\SASVersionedJarRepository\eclipse
-WorkingDirectory
${PlatformVJR}\plugins
\sas.etl.migration.batch_904000.1.0.20121105190000_
v940>
Using a Command Line to Deploy Jobs
223
51
Property
Value
-PickList
${InstallRoot}\SASDataIntegrationStudio\4.7\plugins
\sas.etl.migration.batch\picklist
-SASLauncher
${PlatformVJR}\plugins\sas.launcher.jar
-DISLocation
${InstallRoot}\SASDataIntegrationStudio\4.7
Specify the following properties for the SAS Metadata Server and the SAS Application
Server that will be used to deploy the job in the deploySASJobs.xml file:
Table 10.2 2 Server-Specific Properties
Property
Description
The properties that follow are specified for the SAS Metadata Server:
-metaserver
IP address of the SAS Metadata Server.
-metaserverid
Metadata ID for the SAS Metadata Server.
-metaport
Port for the specified server.
-metarepository
Metadata ID for the SAS Metadata Server repository.
-metauser
A registered user of the SAS Metadata Server.
-metapass
Password for the specified user.
The properties that follow are specified for the SAS Application Server that will be used to
deploy the job:
-servermachine
IP address of the SAS Workspace Server that will
deploy the job.
-serverport
Port for the specified server.
-username
A registered user of the SAS Workspace Server. This
user must be an external user, such as a real person. It
cannot be an internal user such as the SAS Trusted
User.
-password |
Password for the specified user.
-batchserver
Name of the batch server to use for deployment. The
default value is the SAS DATA Step Batch Server
component of the SAS Application Server.
-sourcedir
Location of the SAS source code.
-manifest
Location of the manifest file.
224
Chapter 10 0 • • Deploying Jobs
50
Property
Description
-deploymentdir
Fully qualified path to the job deployment directory
that is specified in the Ant script. This directory also
must be specified in the metadata for the SAS
Application Server that is associated with the SAS
Workspace Server. To view this directory, you can use
the Schedule Manager module in SAS Management
Console. Alternatively, an administrator can supply
you with the value.
Prepare for Windows Deployment
Perform the following steps to prepare the script:
1. Locate the deploySASJobs.xml Ant script that is deployed by default in the
SASHome/SASDataIntegrationStudio/<version>/batchdeploy
directory. Consider creating a copy of the file to configure so that the original retains
the default settings.
2. Open your copy of deploySASJobs.xml.
3. Enter appropriate values for the following arguments. See “Review the
Prerequisites” on page 223 for information about appropriate values.
4. Save the values and close the deploySASJobs.xml script.
Prepare for Other Operating System Deployments
If you want to use the command-line deployment in an operating system other than
Microsoft Windows, verify that a folder called Security is installed in the installation
folder for SAS Management Console. SAS Management Console must be installed on
the computer where you will be running command-line deployment.
If you do not see a Security folder, then copy the <PlatformVJR>
ð
plugins
ð
sas.etl.migration.batch <version> folder from the computer where SAS Data
Integration Studio is installed. Put these folders in the installation folder for SAS
Management Console. After you do this, update the paths to these locations inside the
deploySASJobs.xml file. See “Review the Prerequisites” on page 223 for information
about appropriate values for other operating system deployments.
Prepare the Manifest
Once you have prepared the Ant script, you must create the manifest file that lists the
jobs that you want to deploy. The manifest file should be formatted as a standard text
file, but name and extension do not matter. Each line of the manifest file is deployed
individually. A line can specify a directory to deploy, a specific job to deploy, or a
regular expression to deploy.
When you specify a directory, all of the jobs within that directory are deployed. When
you specify a specific job, only the matching job is deployed (if it exists). When you
specify a regular expression, any job in the given path that matches the regular
expression passed in by the user is deployed. You can also deploy jobs recursively by
adding the argument -r to the end of the line. When recursion is enabled, all
subdirectories of the given directory are deployed in the same manner as the given
directory.
Using a Command Line to Deploy Jobs
225
44
Perform the following steps to prepare the manifest:
1. Create a new text file to contain the manifest and save in the location specified in the
deployment script file. Note that you can also modify one of the sample manifest
files provided in the SASHome
ð
SASDataIntegrationStudio
ð
<version>
ð
batchdeploy directory.
2. Enter the information about the jobs that you want to deploy. For example,
samplemanifest2 contains the following information:
/SampleFolder/SampleJob -r
/SampleFolder/^[A-Za-z]+$ -r
3. Save the manifest file.
Run the Script
You must install Ant, which you can obtain from http://ant.apache.org/, to run
a deployment script.
Perform the following steps to run the deployment script from a command line:
1. Open a command line.
2. Run the script in Ant, by specifying the script file as follows:
ant –f deploySASJobs.xml
.
Note: If you do not want to store your credentials in an openly available script file, you
can also pass the user name and password through the command line. Use the
following syntax:
ant -f deploySASJobs.xml -Dusername=mysuername -Dpassword=mypassword
(where each argument is preceded by a -D, the name of the parameter matches the
name being set inside the ANT script, and key and value pairs are separated by the
equal sign).
Redeploying Jobs for Scheduling
Problem
After a job has been deployed for scheduling, either the job or the computing
environment changes. For example, additional transformations might be added to the
process flow for the job, or the job might be exported to another environment where the
servers and libraries are different.
Solution
Use the Redeploy Jobs for Scheduling feature to find any jobs that have been deployed
for scheduling, regenerate the code for these jobs, and save the new code to a job
deployment directory. The redeployed jobs can then be rescheduled.
Rescheduling a job is a two-stage process:
• Redeploy the job for scheduling. See “Redeploy a Job for Scheduling” on page 227.
226
Chapter 10 0 • • Deploying Jobs
Documents you may be interested
Documents you may be interested