1832839 Members
2873 Online
110047 Solutions
New Discussion

Unix Script

 
naveends
New Member

Unix Script

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.

Any modifiction/suggestion would be apreciate.

thank you,