Before and After job subroutine

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sheema
Premium Member
Premium Member
Posts: 204
Joined: Sat Jul 22, 2006 10:20 am

Before and After job subroutine

Post by sheema »

I have a job where i need to run a update statement on table xxx before the job runs and another update statement on table xxx after the job is completed.
I have put the update sttements in Before and After Job-sub routines respectively under the ExecTCL option.but i see a error

Output from UniVerse command was

"Table xxx: does not exist".

But i have that table existing in my schema.

Is this the way i am supposed to do or any other better options to execute these update statements.

Thanks
Sheema
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Are you trying to update a Repository Table? If no then this is not the correct way. Have two jobs to do that. One before this present job in question and one after to do the before after updates respectively.
Last edited by DSguru2B on Mon Jan 22, 2007 11:25 am, edited 1 time in total.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
sheema
Premium Member
Premium Member
Posts: 204
Joined: Sat Jul 22, 2006 10:20 am

Post by sheema »

No,it is a table in my schema.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Read my previous reply again, i updated it. I was a little late in hitting submit but o well. Its there.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Is this "xxx" a DataStage hashed file accessed as a table or is it in your source/target database? If the latter it would explain why you are getting this error message.
sheema
Premium Member
Premium Member
Posts: 204
Joined: Sat Jul 22, 2006 10:20 am

Post by sheema »

It is a target table .
ok,i had that doubt whether i can update tables which are not repository tables.so should i have 2 jobs which run before and after the job respectively.
Is there any way that i can do it in a single job .

Thanks
sheema
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Are you sure you want to execute your update statements via a DataStage Engine shell.
I asked this as you are using ExecTCL.

What is the database in question here?
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
sheema
Premium Member
Premium Member
Posts: 204
Joined: Sat Jul 22, 2006 10:20 am

Post by sheema »

my target database is oracle.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

You need to use the before/after SQL tabs in your OCI stage. The before/after routine calls allow you to either run DataStage engine commands (ExecTCL) or operating system commands (ExecSH/ExecDOS) or custom written routines.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
sheema
Premium Member
Premium Member
Posts: 204
Joined: Sat Jul 22, 2006 10:20 am

Post by sheema »

ok,kenneth than should i type in my update statements as it is in the before and after tabs of ORAOCI stage.or should i follow any other format.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

As Ken specified the before/after SQL tabs in your OCI stage will be ideal.
You can also type in the update commands directly there !
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
sheema
Premium Member
Premium Member
Posts: 204
Joined: Sat Jul 22, 2006 10:20 am

Post by sheema »

Thanks every one for all the help.
I will try that .

Thanks
sheema
Post Reply