Sei sulla pagina 1di 121

DataStage Administrator commands

to find:
No Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJ


Find how many Jobs are using given
5
DS_JOBOBJECTS.OLETYPE = 'CHashedInput' and DS_JOBOBJECT
Hashed file as INPUT
DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJ


Find how many Jobs are using given
6
DS_JOBOBJECTS.OLETYPE = 'CHashedOutput' and DS_JOBOBJEC
Hashed file as OUTPU
DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJ


Find how many Jobs are using given
7
DS_JOBOBJECTS.OLETYPE in ('CHashedOutput','CHashedInput') a
Hashed file as INPUT and OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" =
8View column data in a hashed file

SELECT COLUMN_NAME FROM HASHED_FILE_NAME

9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV", "FIE


FROM DICT hashedfile ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('V

11Find which user modified the job last SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLA
List all the projects in DataStage..
12
With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated using


13
UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @
Keymgmt function in Datastage

List all the surrogate key variables


14
used in datastage proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY, DS


DS_JOBOBJECTS.OLETYPE, EVAL DS_JOBOBJECTS."if index(upca
'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS, DS_JOBOBJ
DS_JOBOBJECTS.OBJIDNO and FOUND = 'FOUND' GROUP BY JOB
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands y


machine, @Unix prompt, with a username with sufficient privilaes

1) Log in to Datastage Server


Steps to set Datastage Environment, 2) set path to the directory where DSEngine exe resides
to use Datastage CLI
3) execute command : . ./dsenv (on UNIX servers, DSJOB has
shared library, dsenv sets required library paths for CLI command

Find total number of connection made


1from client to Datastage server with netstat -a | grep 'dsrpc'
the identification of IP address in it.
List all datastage processes executing
2
ps -ef|grep RUN
on the server
3Listing projects, jobs, and parameters
List
List
List
List

Projects
Jobs in a project
job parameters
job invocation ids

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/d
@DsServe
@DsServe
@DsServe
@DsServe

>>
>>
>>
>>

/etl/Ascential/Datastage/DSEngine/bin/dsjob
/etl/Ascential/Datastage/DSEngine/bin/dsjob
/etl/Ascential/Datastage/DSEngine/bin/dsjob
/etl/Ascential/Datastage/DSEngine/bin/dsjob

-lpr
-ljo
-lpa
-lin

Generate XML report of job , its


4
stages and links

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -rep

5Do a pattern based search for job in

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch

the project
<jobname>
List Sequencer jobs calling a specified @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch
job in the project
<jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch
Sequencer job
<SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run


<name1=val1> -param <name2=val2> <projectname> <SeqJob
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -sto

7Start and stop Datastage Server

1)first check that no one is connected to DataStage (netstat -a |


2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start

8Unlock locked/hung datastage


processes

Data Stage throws error with "Unable to run job", it means there
particular Job. We need to kill those hung processes and clear the
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails wit
MHIS_Extract2, then the command is as follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.

Login to UNIX
cd /opt/etl/Ascential/DataStage/DSEngine
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the ab

When running the above command you should see output similar
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job fro

9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -im


-overwrite

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
Troubleshoot Client connectivity from
If error "Unable to open unohist"
10datastage server unix prompt
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server con
6. q

DataStage Administrator commands


to find:
No Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJ


Find how many Jobs are using given
5
DS_JOBOBJECTS.OLETYPE = 'CHashedInput' and DS_JOBOBJECT
Hashed file as INPUT
DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJ


Find how many Jobs are using given
6
DS_JOBOBJECTS.OLETYPE = 'CHashedOutput' and DS_JOBOBJEC
Hashed file as OUTPU
DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJ


Find how many Jobs are using given
7
DS_JOBOBJECTS.OLETYPE in ('CHashedOutput','CHashedInput') a
Hashed file as INPUT and OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" =
8View column data in a hashed file

SELECT COLUMN_NAME FROM HASHED_FILE_NAME

9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV", "FIE


FROM DICT hashedfile ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('V

11Find which user modified the job last SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLA
List all the projects in DataStage..
12
With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated using


13
UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @
Keymgmt function in Datastage

List all the surrogate key variables


14
used in datastage proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY, DS


DS_JOBOBJECTS.OLETYPE, EVAL DS_JOBOBJECTS."if index(upca
'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS, DS_JOBOBJ
DS_JOBOBJECTS.OBJIDNO and FOUND = 'FOUND' GROUP BY JOB
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands y


machine, @Unix prompt, with a username with sufficient privilaes

1) Log in to Datastage Server


Steps to set Datastage Environment, 2) set path to the directory where DSEngine exe resides
to use Datastage CLI
3) execute command : . ./dsenv (on UNIX servers, DSJOB has
shared library, dsenv sets required library paths for CLI command

Find total number of connection made


1from client to Datastage server with netstat -a | grep 'dsrpc'
the identification of IP address in it.
List all datastage processes executing
2
ps -ef|grep RUN
on the server
3Listing projects, jobs, and parameters
List
List
List
List

Projects
Jobs in a project
job parameters
job invocation ids

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/d
@DsServe
@DsServe
@DsServe
@DsServe

>>
>>
>>
>>

/etl/Ascential/Datastage/DSEngine/bin/dsjob
/etl/Ascential/Datastage/DSEngine/bin/dsjob
/etl/Ascential/Datastage/DSEngine/bin/dsjob
/etl/Ascential/Datastage/DSEngine/bin/dsjob

-lpr
-ljo
-lpa
-lin

Generate XML report of job , its


4
stages and links

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -rep

5Do a pattern based search for job in

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch

the project
<jobname>
List Sequencer jobs calling a specified @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch
job in the project
<jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch
Sequencer job
<SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run


<name1=val1> -param <name2=val2> <projectname> <SeqJob
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -sto

7Start and stop Datastage Server

1)first check that no one is connected to DataStage (netstat -a |


2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start

8Unlock locked/hung datastage


processes

Data Stage throws error with "Unable to run job", it means there
particular Job. We need to kill those hung processes and clear the
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails wit
MHIS_Extract2, then the command is as follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.

Login to UNIX
cd /opt/etl/Ascential/DataStage/DSEngine
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the ab

When running the above command you should see output similar
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job fro

9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -im


-overwrite

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
Troubleshoot Client connectivity from
If error "Unable to open unohist"
10datastage server unix prompt
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server con
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
6
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
given Hashed file as OUTPU
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
2List all datastage processes

ps -ef|grep RUN

executing on the server


Listing projects, jobs, and
3
parameters
List Projects
List Jobs in a project
List job parameters
List job invocation ids

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

Start and stop Datastage


7
Server

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>
1)first check that no one is connected to DataStage (netstat -a | grep
dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start

Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

DataStage Administrator
commands to find:
No

Command Description

1DS Project Object counts

Command

SELECT COUNT(*) FROM DS_JOBS;


SELECT COUNT(*) FROM DS_JOBOBJECTS;

2List all jobs in a DS project

SELECT JOBNO, @ID, CATEGORY, NAME FROM DS_JOBS

3Clear Log From Administrator

select JOBNO from DS_JOBS where NAME='Name of the job'


CLEAR.FILE RT_Logxx where xx is JOBNO.

4CLEAR HASH FILE.

CLEAR.FILE <HASHED FILE NAME>

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from


DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
Find how many Jobs are using
5
'CHashedInput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO and
given Hashed file as INPUT
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by
JOB_NAME;

6Find how many Jobs are using select DS_JOBS.NAME AS JOB_NAME FMT '35L' from
given Hashed file as OUTPU
DS_JOBOBJECTS,DS_JOBS where DS_JOBOBJECTS.OLETYPE =
'CHashedOutput' and DS_JOBOBJECTS.OBJIDNO = DS_JOBS.JOBNO a
EVAL DS_JOBOBJECTS."@RECORD<6>" = 'hashed file name' group by

JOB_NAME;

select DS_JOBS.NAME AS JOB_NAME FMT '35L' from DS_JOBOBJECTS,


Find how many Jobs are using DS_JOBS where DS_JOBOBJECTS.OLETYPE in
7given Hashed file as INPUT and ('CHashedOutput','CHashedInput') and DS_JOBOBJECTS.OBJIDNO =
OUTPUT
DS_JOBS.JOBNO and EVAL DS_JOBOBJECTS."@RECORD<6>" = 'Hash
file name' group by JOB_NAME;
View column data in a hashed
8
SELECT COLUMN_NAME FROM HASHED_FILE_NAME
file
9List metadata of hashfile

SELECT "FIELD", "FIELD.TYPE", "FIELD.DEF", "FIELD.CONV",


"FIELD.HEAD", "FIELD.FMT", "FIELD.ASSOC" FROM DICT hashedfile
ORDER BY "FIELD.NO", "TYPE";

10Insert data into the hashfile

INSERT INTO HASHED_FILE_NAME (COLUMN_NAME) VALUES ('VALUE

Find which user modified the


11
job last

SELECT INSTANCE, DTM, MODIFIER FROM DS_AUDIT WHERE CLASS =


AND INSTANCE LIKE 'JOB NAME';

List all the projects in


12
DataStage.. With Owner

SELECT @ID, NAME FMT '40L' FROM UV.ACCOUNT;

Reset surrogate key generated


UPDATE SDKSequences USING DICT VOC SET F1 = '1' WHERE @ID =
13using Keymgmt function in
'Your_Sequence_Name';
Datastage
List all the surrogate key
14variables used in datastage
proj

SELECT * FROM SDKSequences;

List Datastage error message


15
decsription, given error me

SELECT * FROM SYS.MESSAGE WHERE @ID = '081002';

16List all jobs using a TABLE

SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY,


DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE,
EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TABLE_NAME',1)
then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS,
DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDN
and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY,
OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND;

Using DS CLI:

Datastage Command line interface or CLI is a set of commands you ca


run on the Datastage server machine, @Unix prompt, with a username
with sufficient privilaes and after setting datastage environment.

1) Log in to Datastage Server


Steps to set Datastage
2) set path to the directory where DSEngine exe resides
Environment, to use Datastage 3) execute command : . ./dsenv (on UNIX servers, DSJOB has a
CLI
runtime dependency on the libvmdsapi.so shared library, dsenv sets
required library paths for CLI commands)
Find total number of
connection made from client to
1Datastage server with the
netstat -a | grep 'dsrpc'
identification of IP address in
it.
List all datastage processes
2
executing on the server

ps -ef|grep RUN

Listing projects, jobs, and


3
parameters

1)set fully qualified path for dsjob exe


for example, DsServe > /etl/Ascential/Datastage/DSEngine/bin/dsjob

List Projects
List Jobs in a project
List job parameters
List job invocation ids

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lproject


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -ljobs
<projectname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -lparams
<projectname> <jobname>
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob
-linvocations <projectname> <jobname>

Generate XML report of job , its @DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -report


4
stages and links
<projectname> <jobname>

Do a pattern based search for


@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
5
job in the project
-matches -sub -oc -oj <projectname> <jobname>
List Sequencer jobs calling a
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
specified job in the project
-usedby -r -oc -oj <projectname> <jobname>
List all jobs called in specified
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dssearch -ljobs
Sequencer job
-r -oc -oj <projectname> <SeqJobname>
6Run datastage job
Stop a running job

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -run -mo


-wait -jobstatus -param <name1=val1> -param <name2=val2> <pro
@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -stop
<projectname> <SeqJobname>

Start and stop Datastage


7
Server

1)first check that no one is connected to DataStage (netstat -a | grep


dsrpc)
2)User Datastage administrator userid
3)
./uv -admin -stop
./uvregen
./uv -admin -start
Data Stage throws error with "Unable to run job", it means there are
hung processes are sitting for the particular Job. We need to kill those
hung processes and clear the job locks in UV.
Follow the steps to resolve this issue:
Step 1:

1. Find the processes corresponding to the job name that fails with this
error. For instance if the job is MHIS_Extract2, then the command is as
follows:
ps -ef | grep MHIS
Then kill those processes using kill command.
Step 2: Clear the job locks in UV.
Login to UNIX
Unlock locked/hung datastage cd /opt/etl/Ascential/DataStage/DSEngine
8
processes
. ./dsenv
bin/uvsh
logto uv
list.readu every
Locate the job that appears to be locked
Write down the associated number from the 4th column (Userno)
unlock user ##### all (where ##### is the Userno from the above
step)

When running the above command you should see output similar to th
following:
Clearing Record locks.
Clearing GROUP locks.
Clearing FILE locks.
To exit out of UV type

Step 3: Clear the Status file and clean up resources of the job from Da
Stage Director
9Import Datastage jobs

@DsServe >> /etl/Ascential/Datastage/DSEngine/bin/dsjob -import


<projectname> <DSXfilename> -overwrite

Troubleshoot Client
connectivity from datastage
10
server unix prompt

1.
2.
3.
4.

Login to UNIX host using NIS+ account


. ./dsenv
cd $DSHOME
bin/uv
If error "Unable to open unohist"
Then file permissions issues exist
5. logto <DataStage project name>
If successful
Then client connectivity problems are not due to server config.
6. q

Potrebbero piacerti anche