P. 1
SAP Business Objects Data services Designer Guide

SAP Business Objects Data services Designer Guide

|Views: 37,948|Likes:
Published by anuragsharma83

More info:

Published by: anuragsharma83 on Mar 25, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

09/16/2015

pdf

text

original

In addition to setting a variable inside a job using an initialization script, you
can setand maintainglobalvariablevalues outsidea job.Values setoutside
a job are processed the same way as those set in an initialization script.
However, if you set a value for the same variable both inside and outside a
job, the internal value will override the external job value.

Values for global variables can be set outside a job:
• As a job property
• As an execution or schedule property

Global variables without defined values are also allowed. They are read as
NULL.

All values defined as job properties are shown in the Properties and the
Execution Properties dialogs of the Designer and in the Execution Options
and Schedule pages of the Administrator. By setting values outside a job,
you can rely on these dialogs for viewing values set for global variables and
easily edit values when testing or scheduling a job.

Note:

You cannot pass global variables as command line arguments for real-time
jobs.

To set a global variable value as a job property

1. Right-click a job in the object library or project area.
2. Click Properties.

358 SAP BusinessObjects Data Services Designer Guide

Variables and Parameters

15 Using global variables

3. Click the Global Variable tab.
All global variables created in the job appear.

4. Enter values for the global variables in this job.
You can use any statement used in a script with this option.

5. Click OK.

The software saves values in the repository as job properties.

You can also view and edit these default values in the Execution
Properties dialog of the Designer and in the Execution Options and
Schedule pages of the Administrator. This allows you to override job
property values at run-time.

Related Topics

• Reference Guide: Data Services Scripting Language

To set a global variable value as an execution property

1. Executea job fromthe Designer, or executeor schedule a batchjob from
the Administrator.

Note:

For testing purposes, you can execute real-time jobs from the Designer
in test mode. Make sure to set the execution properties for a real-time
job.

2. View the global variables in the job and their default values (if available).
3. Edit values for global variables as desired.
4. IfyouareusingtheDesigner,clickOK.IfyouareusingtheAdministrator,
click Execute or Schedule.
The job runs using the values you enter. Values entered as execution
properties are not saved. Values entered as schedule properties are
saved but can only be accessed from within the Administrator.

SAP BusinessObjects Data Services Designer Guide 359

15

Variables and Parameters

Using global variables

Automatic ranking of global variable values in a job

Using the methods described in the previous section, if you enter different
values for a single global variable, the software selects the highest ranking
value for use in the job. A value entered as a job property has the lowest
rank. A value defined inside a job has the highest rank.
• If you set a global variable value as both a job and an execution property,
theexecutionpropertyvalueoverridesthejobpropertyvalueandbecomes
the default value for the current job run. You cannot save execution
property global variable values.

For example, assume that a job, JOB_Test1, has three global variables
declared: $YEAR, $MONTH, and $DAY. Variable $YEAR is set as a job
property with a value of 2003.

For your the job run, you set variables $MONTH and $DAY as execution
properties to values 'JANUARY' and 31 respectively. The software
executesalistofstatementswhichincludesdefaultvaluesforJOB_Test1:

$YEAR=2003;
$MONTH='JANUARY';
$DAY=31;

For the second job run, if you set variables $YEAR and $MONTH as
execution properties to values 2002 and 'JANUARY' respectively, then
the statement $YEAR=2002 will replace $YEAR=2003. The software
executes the following list of statements:

$YEAR=2002;
$MONTH='JANUARY';

Note:

In this scenario, $DAY is not defined and the software reads it as NULL.
Youset$DAYto31duringthefirstjobrun;however,executionproperties
for global variable values are not saved.

• If you set a global variable value for both a job property and a schedule
property, the schedule property value overrides the job property value
and becomes the external, default value for the current job run.

The software saves schedule property values in the repository. However,
these values are only associated with a job schedule, not the job itself.

360 SAP BusinessObjects Data Services Designer Guide

Variables and Parameters

15 Using global variables

Consequently, these values are viewed and edited from within the
Administrator.
• Aglobalvariablevaluedefinedinsideajobalwaysoverridesanyexternal
values. However, the override does not occur until the software attempts
to apply the external values to the job being processed with the internal
value. Up until that point, the software processes execution, schedule,
or job property values as default values.

For example, suppose you have a job called JOB_Test2 that has three
work flows, each containing a data flow. The second data flow is inside
a work flow that is preceded by a script in which $MONTH is defined as
'MAY'. The first and third data flows have the same global variable with
novaluedefined.Theexecutionproperty$MONTH='APRIL'istheglobal
variable value.

In this scenario, 'APRIL' becomes the default value for the job. 'APRIL'
remainsthevaluefortheglobalvariableuntilitencounterstheothervalue
forthesamevariableinthesecondworkflow.Sincethevalueinthescript
is inside the job, 'MAY' overrides 'APRIL' for the variable $MONTH. The
software continues the processing the job with this new value.

SAP BusinessObjects Data Services Designer Guide 361

15

Variables and Parameters

Using global variables

Advantages to setting values outside a job

Whileyoucansetvaluesinsidejobs,thereareadvantagestodefiningvalues
for global variables outside a job.

For example, values defined as job properties are shown in the Properties
and the Execution Properties dialogs of the Designer and in the Execution
Options and Schedule pages of the Administrator. By setting values outside
a job, you can rely on these dialogs for viewing all global variables and their
values. You can also easily edit them for testing and scheduling.

In the Administrator, you can set global variable values when creating or
editing a schedule without opening the Designer. For example, use global
variables as file names and start and end dates.

362 SAP BusinessObjects Data Services Designer Guide

Variables and Parameters

15 Using global variables

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->