Page 1 of 1

Problem retrieving data from db2

Posted: Thu Dec 22, 2011 1:48 am
by kanasai167
this is the first time i use version 8.5 , my job flow is something like this :

DB2 Connector --> Sequential File

In DB2 Connector , after doing all the configuration , the test connection is ok and able to view the data also.
In Sequential File , the columns is also well defined.
The job is also able to compile without any error occurred but cannot run.


This is the job log from DS Director :

main_program: Fatal Error: An error occurred while getting the DB2 instance. Verify that a valid DB2 instance is specified in the Instance property. The method sqlegins returned reason code 0, SQLCODE -1,390.


Thank you.

Posted: Thu Dec 22, 2011 2:12 am
by MT
Hi kanasai167

this has been asked before by the way.
Try it with the instance property left empty - this should work for most situations.
Please keep in mind that they want you to put in the CLIENT Instance name on the DataStage server (if so).

Posted: Thu Dec 22, 2011 5:34 am
by manoj_23sakthi
Hi ,
Could please conform which stage an which back end environment you are using
Stages like (DB2 API, DB2 Enterprise)
Back end like (unix,aix ,mainframe)

why because in main frame environment we tried with DB2 enterprise stage we too face the same problem an we find that in mainframe environment we can't able to use this DB2 Enterprise stage

Please correct me if i am wrong

Posted: Thu Dec 22, 2011 5:48 am
by MT
Hi manoj_23sakthi

the question and answer referred to the DB2 Connector.

With mainframe ( DB2 for z/OS) you can not use the DB2 EE stage
although the DB2 API stage is an option.

Posted: Thu Dec 22, 2011 8:42 am
by qt_ky
I have DB2 Connector working on 8.5 with blank instance name in the stage property. I also have the environment variable set as follows in the dsenv file on the server:

DB2INSTANCE=db2inst1

Posted: Thu Dec 22, 2011 2:42 pm
by ray.wurlod
There's also an APT_ environment variable that can specify the default DB2 instance. I can't recall what it is at the moment.

Posted: Thu Dec 22, 2011 9:35 pm
by kanasai167
Yeah. After i clear the value at instance there then it work well.
Thanks for help again.


at the environment variables there , i saw this field :
APT_DB2INSTANCE_HOME (Description : DB2 Installation Directory)
Is this the variable you mean ? Ray



qt_ky , what is dsenv file ?I could not find it.

Posted: Thu Dec 22, 2011 9:43 pm
by qt_ky
If you have an admin, talk to them about dsenv. It's the DataStage environment variable file. It sets those upon server startup.

Posted: Fri Dec 23, 2011 12:09 am
by ray.wurlod
kanasai167 is on Windows. There is no dsenv file for Windows. It's only for UNIX-based servers.

Posted: Fri Dec 23, 2011 10:49 am
by qt_ky
Oops.. missed that!