Page 1 of 1

Error calling subroutine DSR_EDIT (Action = 2)

Posted: Thu Oct 15, 2009 12:35 am
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?

Posted: Thu Oct 15, 2009 1:47 am
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.

Posted: Thu Oct 15, 2009 4:28 am
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?

Posted: Thu Oct 15, 2009 3:22 pm
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.

Posted: Fri Oct 16, 2009 12:13 am
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?

Posted: Fri Oct 16, 2009 1:32 am
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'

Posted: Mon Nov 02, 2009 2:52 am
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.

Posted: Mon Nov 02, 2009 5:29 am
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?

Posted: Tue Nov 03, 2009 9:49 am
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.

Posted: Sat Nov 07, 2009 5:23 am
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.