BeforeJobSubroutine taking time while executing Unix script

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
austin_316
Participant
Posts: 80
Joined: Fri Aug 21, 2009 7:49 am
Location: India

BeforeJobSubroutine taking time while executing Unix script

Post by austin_316 »

Hi,
I have kind of a weird situation in one of the Datastage projects. There are two subroutines(R1 and R2) which I am using as the BeforeJobSubroutines. Both these subroutines have almost same funcationality as below
1. When a job is started i call the subroutine through the job, connect to database and check if the job has been already executed for the current RUNID(these iam passing through the parameterset).
For this i am calling a shell script to connect to database. Fire a select query on the table and get the count
2. If the RUNID is not present in the database then i will insert a new record.
For this i call another shell script connect to database and insert the record
3. If the RUNID is present then i will update the record.
For this i call another shell script connect to database and insert the record

These two routines are working fine in one project. But on the second project the routine R2 is taking time while it is executing the shell scripts. This issue is not there with R1. The routine R2 is taking time even to show the log "Environment Variables Settings:...". I am assuming this log will be shown after the execution of the subroutine. If that is the case then the Job is taking time even after the completion of the Routine. I am not able to understand where the exact problem. This issue is not with the other Routine. I initially thought that the connection between the database and the datastage is slow which is causing this issue. But I am not getting this with the other routine. This is what confusing me alot :?
Can anyone please help me understand this?

Thanks.
Post Reply