Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unix script via ETL

Status
Not open for further replies.

naveends

Programmer
Jun 12, 2003
6
0
0
SG
while [ `ps axo cmd|grep "phantom DSD.RUN #JobName." |grep -iv -e "grep" -e "SH -c"|cut -f3 -d " "|cut -f2 -d "."|sort -i|head -1|grep -i #instance_Name#|wc -l` -ne 1 ];do sleep 5; done

Hi,

We do run the ETL jobs via DataStage.

We do have 30 sequences which calls 1 update query.

Most of the time when the update query is run by many countries, the ETL job gets hang.

Becuase of this we have written a above script.

We do in the script i.,e if any job is running for a particular country, the next job will wait to finish the previous one.

Some cases like FVL, gfl, scf the script works.

but some cases like eas, bog, cld the scripts runs all the etl job at a time.

Here instance_Name is fvl, gfl, scf, eas, bog, cld.

Any modifiction/suggestion would be appreciated.

thank you
 

Sounds like Chinese to me.
[yinyang]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Any modifiction/suggestion would be appreciated
TO DO WHAT ????
 
When you have multi systems hitting your application at the same time, you should have a better organized procedures to control the chaos and collisions of processes. A simple file that has control records can solve your hang-up problems. Your programs or scripts should be able to scrutinize the control records if a certain program is running (then loop). An example would be when payroll check runs that include several table updates, other application program are not allowed to be executed.
 
Thank for replying, given the solution to client to do the sorting before starting for all the instance_Name.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top