Job Aborted

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
pongal
Participant
Posts: 77
Joined: Thu Mar 04, 2004 4:46 am

Job Aborted

Post by pongal »

I have created Environment variables like DSN,UserID,Pwd at Project Level in UserDefined variables.
My job is parallel job, when i try to pass those enviroment variables as parameters to the parallel job, job is aborting saying that Warning: DB2_UDB_API_OWPYDATA_FO901: Unable to connect to DB2 server '#$DEV_SRC_DB_SERVER#'.
But when i give actual value without parameters, the job is working fine.

what could be the reason ?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Ummm... what happens when you remove the "#" characters?
pongal
Participant
Posts: 77
Joined: Thu Mar 04, 2004 4:46 am

Post by pongal »

When i remove #, it is giving the error Warning: DB2_UDB_API_OWPYDATA_FO901: Unable to connect to DB2 server '$DEV_SRC_DB_SERVER'.

do i need to create these Environement varaibles in Parallel Environment in Enviroment Variables button of DS Administrator for a particular project when i try to pass these parameters in parallel job ?

The heirarchy of Navigator is like this in Enviroment variables in DS Admin tool.

General
-->customize
Parallel
--> OperatorSpecific
-->compiler
UserDefined

Even i tried in Parallel --> OperatorSpecific, but i could not able to create a variable as it is not creating a record to add a new enviroment variable except in UserDefined Enviroment.

has anybody encountered this kind of problem ?
pongal
Participant
Posts: 77
Joined: Thu Mar 04, 2004 4:46 am

Post by pongal »

some more info i am updating here.
when i press view data of DB2_UDB_API Stage have parameters as environment variables for DSN , UserID, Password, it is connecting to database and displaying the records properly.
But, when i try to run the job, it is giving the error
Warning: DB2_UDB_API_OWPYDATA_FO901: Unable to connect to DB2 server '$DEV_SRC_DB_SERVER'

i am just wondering why this is happening at runtime :roll:
kris
Participant
Posts: 160
Joined: Tue Dec 09, 2003 2:45 pm
Location: virginia, usa

Post by kris »

How are you running this job? Using dsjob ?

Looks like that perticular parameter is not setting at runtime. Look in the director job log for environment variable settings of that job. see what your variables are set to at runtime?or else only that variable is not set and other variables are set......

you can declare shell variables (user defined environment variable names) in your script and assign values to it and export them before dsjob command. Thats how you set your env variables in script.

If you are running using dsjob in shell script, you need few things:
1.Source dsenv file to your script
2. use -local option in dsjob command
3. you need to be in the project directory to run dsjob with -local(if you set the bin path and cd to projects directory, should be fine)

Hope this will help.... :)

Kris~
Post Reply