Error calling subroutine DSR_EDIT (Action = 2)

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
parag.s.27
Participant
Posts: 221
Joined: Fri Feb 17, 2006 3:38 am
Location: India
Contact:

Error calling subroutine DSR_EDIT (Action = 2)

Post by parag.s.27 »

Hi All,

I've gone through many posts in the forum and still did not find any solution for my error hence I am opening a new post.

I am getting an error while executing a server Transform Function in Sequence job or while testing the function. The error is: -


Code: Select all

Error calling subroutine DSR_EDIT (Action = 2), check DataStage is set up correctly in project XYZ
subroutine failed to complete successfully (30107)
What I am trying to do is from this function I am trying to connect to a database using ODBC connectivity for a DSN. Since the Client has refused to provide the native connectivity to database and has insisted on using a DSN, I had to use this method.

If this runs successfully then I'll be able to make my job design more simple and more effective.

The code for the routine is pasted below: -

Code: Select all

$INCLUDE UNIVERSE.INCLUDE ODBC.H 
  
<Connecting database through ODBC >

can some one please help is this regard?
Last edited by parag.s.27 on Thu Oct 15, 2009 3:04 am, edited 1 time in total.
Thanks & Regards
Parag Saundattikar
Certified for Infosphere DataStage v8.0
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DSR_EDIT is an internal helper subroutine called, among other things, when you are editing something in the Repository. Can you edit routines in other projects successfully? Try re-booting your DataStage client machine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
parag.s.27
Participant
Posts: 221
Joined: Fri Feb 17, 2006 3:38 am
Location: India
Contact:

Post by parag.s.27 »

ray.wurlod wrote:DSR_EDIT is an internal helper subroutine called, among other things, when you are editing something in the Repository. Can you edit routines in other projects successfully? Try re-booting your Data ...
Yes I can edit other routines in same as well as other projects.

Can it be a case that I am including a library file ODBC.H and it is not present in the DataStage library files.

Also can there be another way to access the Database using a DSN connectivity in a routine?
Thanks & Regards
Parag Saundattikar
Certified for Infosphere DataStage v8.0
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

ODBC.H does exist in UNIVERSE.INCLUDE

Code: Select all

SELECT @ID FROM UNIVERSE.INCLUDE WHERE @ID = 'ODBC.H';
So it's not that.
Is this error reproducible? Perhaps you simply lost the connection from that client.

The error is occurring when you are editing the routine, not when you are trying to access the database. The BCI functions (which mimic ODBC API functions) are the only way I know to access a database via an ODBC DSN from a routine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
parag.s.27
Participant
Posts: 221
Joined: Fri Feb 17, 2006 3:38 am
Location: India
Contact:

Post by parag.s.27 »

ray.wurlod wrote:ODBC.H does exist in UNIVERSE.INCLUDE

Code: Select all

SELECT @ID FROM UNIVERSE.INCLUDE WHERE @ID = 'ODBC.H';
So it's not that.
Is this error reproducible? Perhaps you simply lost the connection from th ...
Hi Ray,

Thanks a lot for your reply.

The error is reproducible in the sense that only for this routine when I try to test it, it gives me the error otherwise all other routines are running fine.

I could not understand the @ID part of UNIVERSE.INCLUDE. Do you want me to use @ID? If so, can you please elaborate?
Thanks & Regards
Parag Saundattikar
Certified for Infosphere DataStage v8.0
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

@ID is a column name within UNIVERSE.INCLUDE. You may need to enclose it in double quotes. Or you can use the RetrieVe query language.

Code: Select all

LIST UNIVERSE.INCLUDE WITH @ID = 'ODBC.H'
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
parag.s.27
Participant
Posts: 221
Joined: Fri Feb 17, 2006 3:38 am
Location: India
Contact:

Post by parag.s.27 »

ray.wurlod wrote:@ID is a column name within UNIVERSE.INCLUDE. You may need to enclose it in double quotes. Or you can use the RetrieVe query language.

Code: Select all

LIST UNIVERSE.INCLUDE WITH @ID = 'ODBC.H'
...
Hi Ray,

I tried adding this piece of code in my routine but still it is giving me the same error.

I've checked few things and found out that the ODBC.H file in DSEngine\INCLUDE does not have an excecutable right. Can this be causing the error. As far as I know the execution rights are not needed.

I've also checked the uvodbc.config file and the DSN that I am providing has an entry in it so it was also not a problem.
Thanks & Regards
Parag Saundattikar
Certified for Infosphere DataStage v8.0
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

This is not part of your routine. It is a query to prove that ODBC.H exists in UNIVERSE.INCLUDE.

What happens if you rename the routine? What happens if you make a copy of the routine?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
parag.s.27
Participant
Posts: 221
Joined: Fri Feb 17, 2006 3:38 am
Location: India
Contact:

Post by parag.s.27 »

ray.wurlod wrote:This is not part of your routine. It is a query to prove that ODBC.H exists in UNIVERSE.INCLUDE.

What happens if you rename the routine? What happens if you make a copy of the routine? ...
Apologies for misinterpreting your comments Ray.

Even though I make a copy of it or I copy the code and paste in another routine, still the same errors come. I am going to try few more things and I'll check whether anything is related to the access rights of the file.
Thanks & Regards
Parag Saundattikar
Certified for Infosphere DataStage v8.0
parag.s.27
Participant
Posts: 221
Joined: Fri Feb 17, 2006 3:38 am
Location: India
Contact:

Post by parag.s.27 »

parag.s.27 wrote:
ray.wurlod wrote:This is not part of your routine. It is a query to prove that ODBC.H exists in UNIVERSE.INCLUDE.

What happens if you rename the routine? What happens if you make a copy of the routine? ...
Apologies for misinterpreting your comments Ray.

Even though I make a copy of it or I copy the code and paste in another routine, still the same errors come. I am going to try few more things and I'll check whether anything is related to the access rights of the file.
Hi...I wa luckily able to resolve this problem. Actually to use ODBC feature you have to have an entry in odbc.ini file in DSEngine. I made the entry and it did not throw this error.
Thanks & Regards
Parag Saundattikar
Certified for Infosphere DataStage v8.0
Post Reply