i want to lack the table while extracting the file....

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
vijaydev
Participant
Posts: 54
Joined: Sun May 20, 2007 6:31 pm

i want to lack the table while extracting the file....

Post by vijaydev »

We have a requirement like we have to update a flag before and after running our sequences


Eg. The table structures is


SeqNo TableName Result

1 P1 50 ( If the result is 50 we will start our jobs and the run time we will update this table is 10 at that time other dependency jobs wont run)

2 P1 10 ( at the time of running)

3 P1 20 (after finishing we will update as 20) its



our requirement in this table seqno is primary key , its working for fine if only one sequence is running, we are facing the problem when we are running the two sequence at the same time its get the same max sequence number and try to put duplicate seqno. While picking the max sequence number I want to lock the table.

Vijay
Vijay
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Need some clarification with your requirement.
If you lock the table, the flow which is not dependent on the current running or sequence that are about to run will also need to wait till the current one to finish. But If I understand properly, it should not be the case.
If that is the case, you can very well pick up the max sequence no only if the Result is 20.
Else optionallay you have have another cloumn to maintain another number uniqule identify each flow of your project.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
vijaydev
Participant
Posts: 54
Joined: Sun May 20, 2007 6:31 pm

Post by vijaydev »

No, only the jobs/sequence which is access the table needs to be wait.
Vijay
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

That case you can follow and maintain another column for each flow so that you ll get the uniqnes with combination of the fields.
What is the Database?
Other option would be, lock the table manually using Database comand.
If its oracle, LOCK TABLE <tablename> IN EXCLUSIVE MODE;
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply