Problem retrieving data from db2

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
kanasai167
Participant
Posts: 63
Joined: Mon Sep 12, 2011 2:11 am

Problem retrieving data from db2

Post 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.
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Post 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).
regards

Michael
manoj_23sakthi
Participant
Posts: 47
Joined: Tue Feb 23, 2010 12:16 am
Location: CHENNAI

Post 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
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Post 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.
regards

Michael
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post 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
Choose a job you love, and you will never have to work a day in your life. - Confucius
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kanasai167
Participant
Posts: 63
Joined: Mon Sep 12, 2011 2:11 am

Post 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.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post 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.
Choose a job you love, and you will never have to work a day in your life. - Confucius
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

kanasai167 is on Windows. There is no dsenv file for Windows. It's only for UNIX-based servers.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Oops.. missed that!
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply