Tuesday, February 23, 2010

Datastage Eight Node Configuration

{
node "node1"
{
fastname "aixdapp6000"
pools ""
resource disk "/DataStage/data/DEV/Datasets" {pools ""}
resource scratchdisk "/DataStage/scratch" {pools ""}
}

node "node2"
{
fastname "aixdapp6000"
pools ""
resource disk "/DataStage/data/DEV/Datasets" {pools ""}
resource scratchdisk "/DataStage/scratch" {pools ""}
}

node "node3"
{
fastname "aixdapp6000"
pools ""
resource disk "/DataStage/data/DEV/Datasets" {pools ""}
resource scratchdisk "/DataStage/scratch" {pools ""}
}
node "node4"
{
fastname "aixdapp6000"
pools ""
resource disk "/DataStage/data/DEV/Datasets" {pools ""}
resource scratchdisk "/DataStage/scratch" {pools ""}
}
node "node5"
{
fastname "aixdapp6000"
pools ""
resource disk "/DataStage/data/DEV/Datasets" {pools ""}
resource scratchdisk "/DataStage/scratch" {pools ""}
}
node "node6"
{
fastname "aixdapp6000"
pools ""
resource disk "/DataStage/data/DEV/Datasets" {pools ""}
resource scratchdisk "/DataStage/scratch" {pools ""}
}
node "node7"
{
fastname "aixdapp6000"
pools ""
resource disk "/DataStage/data/DEV/Datasets" {pools ""}
resource scratchdisk "/DataStage/scratch" {pools ""}
}

node "node8"
{
fastname "aixdapp6000"
pools ""
resource disk "/DataStage/data/DEV/Datasets" {pools ""}
resource scratchdisk "/DataStage/scratch" {pools ""}
}



}

Wednesday, February 10, 2010

TOAD KEYBOARD SHORTCUTS

TOAD KEYBOARD SHORTCUTS:
========================================================

F1 ------------- Windows help file

F2 ------------- Toggle full screen editor

Shift+F2-------- Toggle full screen grid

F3---------------Find next occurrence

F4---------------Describe

F5---------------Set or delete a breakpoint in Proc Editor for
PL/SQL debugging or execute as script in SQL Editor.

F6---------------Toggle between SQL Editor and results panel.

F7-------------- Clear all text, trace into Proc Editor

F8---------------Recall previous SQL statement or step over in
Proc Editor for PL/SQL debugging.

F9--------------- Execute statement in SQL Editor compile in Proc Editor

Ctrl+F9---------- Verify statement without execution (parse) in SQL Editor, set parameters in Proc Editor for PL/SQL debugging.

Shift+F9--------- Execute current statement at cursor in SQL Editor or
execute current source in Proc Editor without PL/SQL debugging
F10-------------- Popup menu

F11------------- Run (continue execution) in Proc Editor for PL/SQL debugging

F12-------------- Run to cursor in Proc Editor for PL/SQL debugging.

ctrl+F12--------- Pass SQL or Proc Editor contents to specified external editor

ctrl+alt+B------- Display PL/SQL debugger breakpoints window

ctrl+D----------- Display procedure parameters

ctrl+alt+D------- Display PL/SQL debugger in DBMS output window

ctrl+E----------- Execute explain plan on current statement

ctrl+alt+E------- Display PL/SQL debugger evaluate/modify window

ctrl+G----------- Go to line

ctrl+L----------- Convert text to lowercase

ctrl+M----------- Make code statement

ctrl+N----------- Recall named SQL statement

ctrl+P----------- Strip code statement

ctrl+R----------- Find and replace

shift+ctrl+S---- Save file as

ctrl+alt+S------- Display PL/SQL debugger call stack window

ctrl+T------------ column dropdown

ctrl+U----------- Converts text to uppercase

ctrl+alt+W------- Display PL/SQL debugger watches window

ctrl+shift+z----- Redo last undo

alt+UP----------- Display previous statement

alt+DOWN--------- Display next statement (after alt+UP)

ctrl+HOME-------- In data grids, go to top of the recordset

ctrl+END--------- In data grids, go to end of the recordset

ctrl+TAB--------- Cycle through collection of MDI child windows

ctrl+(period)---- Auto completes tablenames

ctrl+ENTER-------- Execute current SQL (same as shift+F9)

Sunday, February 7, 2010

DataStage run from command prompt

/opt/IBM/InformationServer/Server/DSEngine/bin/dsjob -run -mode NORMAL -wait -jobstatus -param Cycle=PSDATASTAGE DW_STORES NewSequence.PSDATASTAGE

What is Autosys ?


What is Autosys?
• An automated job control system for scheduling,monitoring and reporting jobs
• The jobs can reside on an Autosys configured machine attached to a network

What is an Autosys Job?
• A single action performed on a validated machine
• Autosys jobs can be defined using GUI or JIL
• Any single command,executable script or NT batch file.It includes a set of qualifying attributes ,conditions specifying when and where a job should be run.

Autosys jobs can be defined by assigning it a name and specifying attributes describing its behavior.

Two methods to define Autosys Jobs are:-
1. Using Autosys GUI
• Autosys GUI allows to set the attributes that describe when,where and how a job should be run.
• GUI Control Panel is used to define jobs.Contain fields that correspond to Autosys JIL sub-commands and attributes.

2. Using Job Information Language(JIL)
• A specification language that has its own commands to describe when,where and how a job should be run.
• The attributes are set b JIL sub-commands

Defining Autosys Jobs
There are the three methods you can use to create job definitions:

# By Autosys Web interface

# By AutoSys Graphical User Interface (GUI).

# By using AutoSys Job Information Language (JIL) through a command-line interface.

Autosys Job Types and Structure
There are three types of jobs:

Command,
File Watcher
Box.

-----------------------------------------------------------
System Components Autosys system components are:-
• Event Server
• Event Processor
• Remote Agent

Event Server (or Autosys Database)
# Data Repository that stores Autosys system information,events and job definitions.
# The Autosys Db is termed ‘Data Server’ which describes a server instance

Event Processor

# Interprets and processes all the events it reads from the Autosys Database

# A program that actually runs Autosys

# Scans the database for processing events. Checks if the events satisfy the starting conditions of the job and the determines the actions


Remote Agent

# Temporary process started by the event processor to perform a specific task on a remote machine

# It starts the command specified for a given job, sends running and completion information about a task to the Event Server

# If it is unable to transfer the information, it waits and tries until it successfully communicates with the Db


Interaction Between System Components

• Step1: From the Autosys event server(that holds the Events and Job Definitions info),the Event Processor reads the new event,checks for the condition,reads the job definition and determines the actions.

• Step2: The Remote Agent receives the instructions from the Event Processor

• Step3: The Remote Agent performs resource checks,ensuring minimum specified number of processors are available and then initiates a child process that runs the specified command

• Step4: The command completes and exits,with the Remote Agent capturing the command’s exit code.

• Step5: The Remote Agent directly communicates the event(exit code,status) to the Event Server.
Autosys Machines V/s Autosys Instances
Autosys architecture has two types of machines:-

• Server Machine:
# The machine on which the Event Processor and Event Server reside

• Client Machine:
# The machine on which the Remote Agent resides and where Autosys jobs are run.

What is an Autosys Instance?

• A version of Autosys software running as an Autosys server,with one or more clients,on single machine or on multiple machines
• An instance uses its own Event Server and Event Processor by operating independently of all other Autosys instances
• Multiple instances can run and schedule jobs on the same machine without affecting other instances on that machine.

Events
• Since Autosys in Event-driven,it requires an event to occur on which the job depends,for a job to be activated by the Event Processor.


• The sources of these events can be:-

# Jobs changing status such as starting,finishing
# Internal Autosys verification Agents such as detected errors.
# Events send with the SENDEVENT command

• While processing an event,the Event processor scans the database for jobs that are dependent on that event

• If the event satisfies another job’s starting condition,that job is run automatically and completion of that job can cause another job to be started,thereby making the jobs progress in a controlled sequence.

Alarms
• Alarms are special events that send notifications during situations requiring attention

• Addresses incidents that require manual intervention

• For example,a set of jobs could be dependent on the arrival of a file and if the file is long overdue.It is important that someone investiage the situation,make a decision and resolve the problem.

• Aspects of alarms include but is not limited to:-
# Alarms are informational only.Any action to be taken due to a problem is intiated by a separate action event.
# Alarms are system messages about a detected problem
# Alarms are sent through the system as an event

Utilities
• Autosys provides a set of commands that run essential utility programs for defining,controlling and reporting on jobs .

• For example the autorep command allows generating a variety of reports about job execution,and the sendevent commands allow manually controlling job processing.

• Additional utility programs are provided to assist in troubleshooting running monitors and browsers,and starting/stoping Autosys and its components.

• Autosys also provides database maintenance utility that runs daily by default

Autosys Work-Flow

Step1: The Event Processor scans the Event Server for the next event to processor.If no event is ready,the Event Processor scans again in 5 seconds.

• Step2: The Event Processor reads from the Event Server that an event is ready.The job definition and attributes are retrieved from the Event Server,including the command and the pointer to the profile file to be used for the job

• Step3: The Event Processor processes the event.The Event Processor attempts to establish a connection with the Remote Agent on the client machine and passes the job attributes to the client machne.The Event Processor sends a CHANGE_STATUS event marking in the Event Server that the job is in STARTING state

• Step4: The Remote Agent is invoked using the UserID and Password passed from the Event Processor.

• Step5: The Remote Agent receives the job parameters and sends an acknowledgement to the Event Processor

• Step6: The Remote Agent Starts a process and executes the command in the job definition.

• Step7: The Remote Agent issues a CHANGE_STATUS event marking in the Event Server that the job is in RUNNING state

• Step8: The client job process runs to completion,then returns an exit code to the Remote Agent and quits.

• Step9: The Remote Agent sends the Event Server a CHANGE_STATUS event corresponding to the completion status of the job.The Remote Agent quits
============================================================

/* -------------------- APT#gp#box#ps_1 ----------------- */

delete_job: APT#gp#box#ps_1
insert_job: APT#gp#box#ps_1
job_type: b
owner: PSdevl
permission: gx,ge
description: box for DIN34APT
alarm_if_fail: 1

/* -------------------- initialize ----------------- */
/* -------------- APT#gp#cmd#P0_initialize ------------- */

delete_job: APT#gp#cmd#P0_initialize
insert_job: APT#gp#cmd#P0_initialize
job_type: c
box_name: APT#gp#box#ps_1
command: /export/appl/PSdevl/src/run/pS001_initialize_id.ksh
machine: pm_ps_clust
owner: PSdevl
profile: /appl/PSdevl/.profile
permission: gx,ge
description: cmd for DIN34APT
std_out_file: /export/appl/PSdevl/serial/trans/log/$AUTO_JOB_NAME.log.$AUTORUN
std_err_file: /export/appl/PSdevl/serial/trans/err/$AUTO_JOB_NAME.err.$AUTORUN
alarm_if_fail: 1
=======================================================
Note:
gx -- group exicution
ge -- group edit
=======================================================
AutoSys Cheatsheet
=======================================================
SUB-COMMANDS

insert_job: Saves a brand-new job to the database
update_job: PERMANENTLY changes the definition of a pre-
existing job
override_job: TEMPORARILY changes the definition of a pre-
existing job
delete_job: Deletes a single job from the database
delete_box: Deletes a box as well as all the contents

ATTRIBUTES

job_type:command (c), file watcher (f), box (b)(command is default)
machine: Name of machine (or IP) where job is to be
run
command: Command to be executed (.exe, .sh, .bat)
watch_file: File being monitored by file watcher
box_name: Used to nest a job inside a box
std_out_file: Redirects output from a command job to a text
file
std_err_file: Redirects error messages to a text file
condition: Used to structure job dependencies (success,
failure, terminated, done, notrunning, exit code,
and value)
min_run_alarm: Causes job to issue an alarm if it finishes too
quickly
max_run_alarm: Causes a job to issue an alarm if it runs too
long
alarm_if_fail: States whether a job will issue an alarm if it
fails
date_conditions: Toggle which must be set in order for date/time
attributes to be recognized by AutoSys
run_calendar: Specifies the calendar a job will run off of
[cannot be used with days_of_week]
days_of_week: Specifies exact days a job will run [cannot be used with run_calendar]
start_times: Exact time each day a job will run [cannot be
used with start_mins]
start_mins: Minutes after each hour a job will execute
[cannot be used with start_times]
exclude_calendar: Specifies a calendar with days specified upon
which a job will not execute
watch_interval: Steady state for file watchers
watch_file_min_size: Minimum size a file must be before a file watcher can evaluate to success
box_success: Specifies custom success condition for a box
box_failure: Specifies custom failure condition for a box
max_exit_success: Specifies maximum exit code which will be
evaluated as a success
box_terminator: “If I fail, I kill the box I’m in”
job_terminator: “If the box I’m in fails or gets killed, I kill
myself”
term_run_time: “I kill myself after this many minutes”
chk_files: Resource check that verifies a minimum amount
of file space is available before running job
heartbeat_interval: Specifies frequency in minutes at which job’s
command is expected to issue a “heartbeat”
profile: Specifies a file which contains custom
environment variables to be used by a single job
std_in_file: Specifies a file to be used as input for a job
n_retrys: Specifies how many times a job should attempt to
re-run itself after an application-level failure
timezone: Specifies which timezone a job should use when
running
auto_delete: Specifies how many HOURS after successful
completion a job should delete itself from the
database
auto_hold: Used only with jobs in boxes. When the box goes
to a RUNNING state, the job will automatically go ON_HOLD
permission: Extend edit or execute permissions to others
run_window: Specifies when a job can start
avg_runtime: *Only accessible through JIL* Specifies how long
a job takes to run, on average

UNIX / Linux Shell

File Manipulation:
----------------------------------------------------
> file create (voerwrite) file
>> file append to file
>file 2>&1 both output and errors to file
< file read from file
a | b pipe output from 'a'as input to 'b'
====================================================
Common Constructs:
----------------------------------------------------
while read f
do
echo "Line is $f"
done
Comments: Read text file line by line
------------------------------------------------------
$ grep foo myfile
afoo
foo
foobar

Comments: find matching line
------------------------------------------------------
$ cut -d: f5/etc/passwd
Dilbert

Comments: get filed with delimiter
------------------------------------------------------
foo= 'ls'

Comments: get output of command
------------------------------------------------------
case $foo in
a)
echo "foo is A"
;;
b)
echo "foo is B"
;;
*)
echo "foo is not A or B"
;;
esac

Comments: case is a good way to avoid iterating through many if/elif/elif constructs.
----------------------------------------------------
doubleit() {
expr $1\*2
}
doubleit 3 # returns 6-

Case: function declaration and calling syntax
-----------------------------------------------------

for i in *
do
echo "File is $i"
done

Case: A for loop iterates through its input (which is subject to globbing)
=========================================================
Useful Variables
$IFS Internal File Separator
$? return code from last program
$SHELL what shell is running this script?
LANG Language; C is US English
---------------------------------------------------------
Test Operators

if [ "$x -lt "$y" ]; then
# do something
fi
---------------------------------------------------------
Numeric Tests
lt less than
gt greater than
eq equal to
ne not equal
ge greater or equal
le less or equal
---------------------------------------------------------
File Tests
nt newer than
d is a directory
f is a file
r readable
w writeable
x executable
---------------------------------------------------------
String Tests
= equal to
z zero length
n not zero length
---------------------------------------------------------
Logical Tests
&& logical AND
|| logical OR
! logical NOT
---------------------------------------------------------
Argument Variables
$0 program name
$1 1st argument
$2 2nd argument
$3 3rd argument
$4 4th argument
$5 5th argument
$6 6th argument
$7 7th argument
$8 8th argument
$9 9th argument
$* all arguments
$# No.of arguments
-----------------------------------------------------------
Files: Contents / Attributes
find.-size 10k -print files over 10kb
find.-name "*.txt" -print find text files
find/foo -type d -ls is all directories under /foo
three= 'expr 1+2' simple maths
echo "scale = 5; 5121/1024" | bc better maths
egrep "(foo|bar)" file find "foo" or "bar" in file
awk '{print $5 }'file find "foo" or "bar" in file
sed s/foo/bar/g file replace "foo" in file with "bar"
-----------------------------------------------------------
Variable Substitution
${v:-def} $v, or "def" if unset
${v:=def} $v (set to "def" if unset)
${v:?err} $v, or "err" if unset
-----------------------------------------------------------
Conditional Execution
c1||c2 run c1; if it fails, run c2
c1 && c2 run c1; if it works, run c2
-----------------------------------------------------------
Common utilities and switches
ls -lSr list files, biggest last
ls -ltr list files, newest last
ls -lh human-readable filesizes
du -sk* directory sizes (slow)
sort -n sort numerically (not alpha)
ps -ef list my commands
wget URL download URL
time cmd stopwatch on 'cmd'
touch file create file
read x read "x" from keyboard
cmd |\tee file.txt cmd output to stdout and also to file.txt
nice cmd run cmd with low priority
-----------------------------------------------------------
Networking
ifconfig -a list all network interfaces
netstat -r show routers
ssh u@host log in to host as user "u"
scp file.txt\u@host copy file.txt to host as user "u"
-----------------------------------------------------------
General Admin
less file display file, page by page
alias l='ls -l' create "l" as alsias for "ls -l"
tar cf t.tar\list_of_files create a tar archive t.tar from the listed dirs/files
cal 3 1973 display a calendar ( Mar 73)
df -h show disk mounts
truss -p PID show syscalls of PID
-----------------------------------------------------------

Saturday, February 6, 2010

IBM InfoSphere FastTrack

IBM InfoSphere FastTrack

IBM Launches InfoSphere DataStage Balanced Optimizer – DataStage ELT

DataStage ELT is a big step forward for controlling the data integration SQL that gets executed in source and target databases. It brings what is known as ELT technology – the ability to extract data, load it and then transform it inside a database engine. That’s over simplifying it, to borrow a picture from my article the ability to run all or part of a DataStage job on a database engine opens up ETL, ELT, TELT, TLELT, TETLELTLELT. Whatever.

It runs stuff on a database and keeps the metadata mapping in the Metadata Server so you can report on it in the Metadata Workbench. Database code can be a metadata black hole. It’s hard to parse and report on source to target column mappings because different types of SQL syntaxes or complex PL/SQL code can be very hard to import into a metadata tool. And big database vendors like Oracle and Microsoft do not have metadata reporting solutions.

Thursday, February 4, 2010

Sequential File Stage:
----------------------
Schemas

delimited-in.schema
-------------------
record
{final_delim=end, record_delim='\n', delim='|'}
(
KEY:string[];
VALUE:string[];
FIELD1:string[];
FIELD2:string[];
)

======================
delimited-in.txt
----------------
KEY|VALUE|F1|F2
1k|1v|1|1

=======================
fixed-in-char.schema
-----------------------
record
{record_delim='\n', record_length=fixed, delim=none}
(
KEY:string[4];
VALUE:string[6];
FIELD1:string[3];
FIELD2:string[2];
)

==========================
fixed-in-varchar.schema
--------------------------

record
{record_delim='\n', record_length=fixed, delim=none}
(
KEY:string[max=4]{width=4};
VALUE:string[max=6]{width=6};
FIELD1:string[max=3]{width=3};
FIELD2:string[max=2]{width=2};
)
==============================
fixed-in.txt
----------------------

Importing Schema
You can go to Sequential File->Columns->Load->Import->Sequential File Definition
then select Import again. You then create a file format by looking at the file.
It can be either delimited or fixed.
It can have a header row.
If it is fixed you’ll have to know the field widths (no auto-sense). You
could use UltraEdit to find the field widths.

NullsIf the type is char then APT_STRING_PADCHAR is how you control what you
will see when a field is NULL. The length you set will control how many you
see.
If the type is varchar then it is what you set Null field value to that
controls what you will see.

Miscellaneous Option Settings
When you’re running something you can set the Limits->Warnings->No Limit
by going to Tools->Options->Warnings->No Limit. Now you don’t have
to set everytime you run.

Working with Delimited Text
Use Ultra Edit
You have to do nothing more than go to the Column tab and select
Convert to Fixed Column.
Make whatever changes you need then to convert back select Convert to Character Delimited.

Datastage functions and routines

Datastage functions and routines
--------------------------------
$Define
Defines identifiers that control program compilation or supplies replacement text for an identifier.
$IfDef
Tests an identifier to see if it is defined or not defined.
$IfNDef
Tests an identifier to see if it is defined or not defined.
$Include
Inserts source code contained in a separate file and compiles it along with the main program.
$Undefine
Removes an identifier that was set using the $Define statement. If no identifier is set, $Undefine has no effect.
Abs
Returns the absolute (unsigned) value of a number.
ACosreturns the arc-cosine of number in degrees. ACos is the inverse of Cos.
Alpha
Checks if a string is alphabetic. If NLS is enabled, the result of this function is dependent on the current locale setting of the Ctype convention.
Ascii
Converts the values of characters in a string from EBCDIC to ASCII.
ASin
returns the arc-sine of number in degrees. ASin is the inverse of Sin.
ATan
returns the arc-tangent of number in degrees. ATan is the inverse of Tan.
BitAnd
compares two integers bit by bit. For each bit, it returns bit 1 if both bits are 1; otherwise it returns bit 0.
BitNot
inverts the bits in an integer, that is, changes bit 1 to bit 0, and vice versa. If bit.number is specified, that bit is inverted; otherwise all bits are inverted.
BitOr
compares two integers bit by bit. For each bit, it returns bit 1, if either or both bits is 1; otherwise it returns bit 0.
BitReset
resets the specified bit to 0. If it is already 0, it is not changed.
BitSet
sets the specified bit to 1. If it is already 1, it is not changed.
BitTest
tests if the specified bit is set. It returns 1 if the bit is set; 0 if it is not.
BitXOr
compares two integers bit by bit. For each bit, it returns bit 1 if only one of the two bits is 1; otherwise it returns bit 0.
Byte
Lets you build a string byte by byte.
ByteLenReturns the length of a string in bytes
ByteType
Determines the internal function of a particular byte.
ByteVal
Determines the value of a particular byte in a string.
Call
Calls a subroutine.
Case
Alters the sequence of execution in the program according to the value of an expression.
Cats
Concatenates two strings.
Change
Replaces one or more instances of a substring.
Char
Generates an ASCII character from its numeric code value.
Checksum
Returns a checksum value for a string.
CloseSeq
Closes a file after sequential processing.
Col1
Returns the character position preceding the substring specified in the most recently executed Field function.
Col2
Returns the character position following the substring specified in the most recently executed Field function.
Common
Defines a common storage area for variables.
Compare
Compares two strings. If NLS is enabled, the result of this function depends on the current locale setting of the Collate convention.
Convert
Replaces every instance of specified characters in a string with substitute characters.
Cos
returns the cosine of an angle. number is the number of degrees in the angle. Cos is the inverse of ACos.
CosH
returns the hyperbolic cosine of an angle. number is the number of degrees in the angle.
Count
Counts the number of times a substring occurs in a string.
CRC
Returns a 32-bit cyclic redundancy check value for a string.
CRC32
Returns a 32-bit cyclic redundancy check value for a string.
Date
Returns a date in its internal system format.
DCount
Counts delimited fields in a string.
Deffun
Defines a user-written function.
Dimension
Defines the dimensions of one or more arrays.
Div
Divides one number by another.
DownCase
Converts uppercase letters in a string to lowercase. If NLS is enabled, the result of this function depends on the current locale setting of the Ctype convention.
DQuote
Encloses a string in double quotation marks.
DSAttachJob
Attaches to a job in order to run it in job control sequence. A handle is returned which is used for addressing the job. There can only be one handle open for a particular job at any one time.
DSCheckRoutine
Checks if a BASIC routine is cataloged, either in the VOC as a callable item, or in the global catalog space.
DSDetachJob
This routine is used to give back a JobHandle acqu
DSExecute
Executes a DOS or DataStage Engine command from a before/after subroutine.
DSGetJobInfo
Provides a method of obtaining information about a job, which can be used generally as well as for job control. It can refer to the current job or a controlled job, depending on the value of JobHandle.
DSGetLinkInfo
Provides a method of obtaining information about a link on an active stage, which can be used generally as well as for job control. This routine may reference either a controlled job or the current job, depending on the value of JobHandle.
DSGetLogEntry
This function is used to read the full event details given in EventId.
DSGetLogSummary
Returns a list of short log event details. The details returned are determined by the setting of some filters. (Care should be taken with the setting of the filters, otherwise a large amount of information can be returned.)
DSGetNewestLogId
This function is used to get the ID of the most recent log event in a particular category, or in any category.
DSGetParamInfo
This function provides a method of obtaining information about a parameter, which can be used generally as well as for job control. This routine may reference either a controlled job or the current job, depending on the value of JobHandle.
DSGetProjectInfo
Provides a method of obtaining information about the current project.
DSGetStageInfo
Provides a method of obtaining information about a stage, which can be used generally as well as for job control. It can refer to the current job, or a controlled job, depending on the value of JobHandle.
DSGetStageLinks
Returns a field mark delimited list containing the names of all of the input/output links of the specified stage.
DSLogEvent
This function is used to log an event message to a job other than the current one. (Use DSLogInfo, DSLogFatal, or DSLogWarn to log an event to the current job.)
DSLogFatal
Logs a fatal error message in a job's log file and aborts the job.
DSLogInfo
Logs an information message in a job's log file.
DSLogToController
This routine may be used to put an info message in the log file of the job controlling this job, if any. If there isn't one, the call is just ignored.
DSLogWarn
Logs a warning message in a job's log file.
DSMakeJobReport
Generates a string describing the complete status of a valid attached job.
DSMakeMsg
Insert arguments into a message template. Optionally, it will look up a template ID in the standard DataStage messages file, and use any returned message template instead of that given to the routine.
DSPrepareJob
Used to ensure that a compiled job is in the correct state to be run or validated.
DSRunJob
Used to start a job running. Note that this call is asynchronous; the request is passed to the run-time engine, but you are not informed of its progress.
DSSetGenerateOpMetaData
Use this to specify whether the job generates operational meta data or not. This overrides the default setting for the project. In order to generate operational meta data the Process MetaBroker must be installed on your DataStage machine.
DSSetJobLimit
By default a controlled job inherits any row or warning limits from the controlling job. These can, however, be overridden using the DSSetJobLimit function.
DSSetParam
Used to specify job parameter values prior to running a job. Any parameter not set will be defaulted.
DSSetUserStatus
This routine applies only to the current job, and does not take a JobHandle parameter. It can be used by any job in either a JobControl or After routine to set a termination code for interrogation by another job. In fact, the code may be set at any poin
DSStopJob
This routine should only be used after a DSRunJob has been issued. It immediately sends a Stop request to the run-time engine.
DSTransformErrorLogs a warning message to a job log file. Called from transforms only.
DSTranslateCode
Converts a job control status or error code into an explanatory text message.
DSWaitForFile
Suspend a job until a named file either exists or does not exist.
DSWaitForJob
This function is only valid if the current job has issued a DSRunJob on the given JobHandle. It returns if that job has started since the last DSRunJobwas issued on it and si
Dtx
Converts a decimal integer to hexadecimal.
Ebcdic
Converts the values of characters in a string from ASCII to EBCDIC format.
Else
Define several blocks of statements and the conditions that determine which block is executed. You can use a single line syntax or multiple lines in a block.
End
Indicates the end of a program, a subroutine, or a block of statements.
Equate
Equates a value to a symbol or a literal string during compilation.
Ereplace
Replaces one or more instances of a substring.
Exchange
Replaces a character in a string.
Exit
Define a program loop.
Exp
Returns the value of "e" raised to the specified power.
Field
Returns delimited substrings in a string.
FieldStore
Modifies character strings by inserting, deleting, or replacing fields separated by specified delimiters.
Fix
Use the FIX function to convert a numeric value to a floatin-point number with a specified precision. FIX lets you control the accuracy of computation by eliminating excess or unreliable data from numeric results.
Fmt
Formats data for output.
FmtDP
In NLS mode, formats data in display positions rather than by character length.
Fold
Folds strings to create substrings.
FoldDP
In NLS mode, folds strings to create substrings using character display positions.
For
Create a For…Next program loop.
GetLocale
In NLS mode, retrieves the current locale setting for a specified category.
GoSub
Transfers program control to an internal subroutine.
GoTo
Transfers program control to the specified statement.
Iconv
Converts a string to an internal storage format.
If
Execute one or more statements conditionally. You can use a single line syntax or multiple lines in a block.
Index
Returns the starting position of a substring.
InMat
Retrieves the dimensions of an array, or determines if a Dim statement failed due to insufficient memory.
Int
Returns the integer portion of a numeric expression.
IsNull
Tests if a variable contains a null value.
Left
Extracts a substring from the start of a string.
Len
Returns the number of characters in a string.
LenDP
In NLS mode, returns the length of a string in display positions.
Ln
Calculates the natural logarithm of the value of an expression, using base "e".
Locate
Use a LOCATE statement to search dynamic.array for expression and to return a value
Loop
Define a program loop.
Mat
Assigns values to the elements of an array.
Match
Compares a string with a format pattern. If NLS is enabled, the result of a match operation depends on the current locale setting of the Ctype and Numeric conventions.
MatchField
Searches a string and returns the part of it that matches a pattern element.
Mod
Returns the remainder after a division operation.
Nap
Pauses a program for the specified number of milliseconds.
NegReturns the inverse of a number.
Next
Create a For…Next program loop.
Not
Inverts the logical result of an expression.
Null
Performs no action and generates no object code.
Num
Determines whether a string is numeric. If NLS is enabled, the result of this function depends on the current locale setting of the Numeric convention.
Oconv
Converts an expression to an output format.
On
Transfer program control to an internal subroutine.
OpenSeq
Opens a file for sequential processing.
Pwr
Raises the value of a number to the specified power.
Quote
Encloses a string in double quotation marks.
Randomize
Generates a repeatable sequence of random numbers in a specified range.
ReadSeq
Reads a line of data from a file opened for sequential processing.
Real
Use the REAL function to convert number into a floating-point number without loss of accuracy. If number evaluates to the null value, null is returned.
Repeat
Define a program loop.
Return
Ends a subroutine and returns control to the calling program or statement.
Right
Extracts a substring from the end of a string.
Rnd
Generates a random number.
Seq
Converts an ASCII character to its numeric code value.
SetLocale
In NLS mode, sets a locale for a specified category.
Sinreturns the sine of an angle. number is the number of degrees in the angle. Sin is the inverse of ASin.
SinH
returns the hyperbolic sine of an angle. number is the number of degrees in the angle.
Sleep
Pauses a program for the specified number of seconds.
Soundex
Generates codes that can be used to compare character strings based on how they sound.
Space
Returns a string containing the specified number of blank spaces.
Sqrt
Returns the square root of a number.
SQuote
Encloses a string in single quotation marks.
Status
Returns a code that provides information about how a preceding function was executed.
Str
Composes a string by repeating the input string the specified number of times.
Substring
Returns a substring of a string.
Substrings
Returns a substring of a string.
Tan
returns the hyperbolic tangent of an angle. number is the number of degrees in the angle.
TanH
returns the hyperbolic tangent of an angle. number is the number of degrees in the angle.
Then
Execute one or more statements conditionally. You can use a single line syntax or multiple lines in a block.
Time
Returns the internal system time.
TimeDate
Returns the system time and date. If NLS is enabled, the result of this function depends on the current locale setting of the Time convention.
Trim
Trims unwanted characters from a string.
TrimB
Trims trailing spaces from a string.
TrimF
Trims leading spaces and tabs from a string.
UniChar
In NLS mode, generates a single character in Unicode format.
UniSeq
In NLS mode, converts a Unicode character to its equivalent decimal value.
Until
Define a program loop.
UpCase
Changes lowercase letters in a string to uppercase. If NLS is enabled, the result of this function depends on the current locale setting of the Ctype convention.
WEOFSeq
Writes an end-of-file mark in an open sequential file.
While
Define a program loop.
WriteSeq
Writes a new line to a file that is open for sequential processing and advances a pointer to the next position in the file.
WriteSeqF
Writes a new line to a file that is open for sequential processing, advances a pointer to the next position in the file, and saves the file to disk.
Xtd
Converts a hexadecimal string to decimal.

--------------------------------------------------------------------------------

Tuesday, February 2, 2010

DataStage Sequence

Job Sequence Palette:
Job Sequence Activity: