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!

How to make a pause in a Mercator map ?

Status
Not open for further replies.

Fortiche

IS-IT--Management
Feb 8, 2005
4
0
0
BE
Hi,

Because our system has become too fast (recently by adding a lot of CPU's), I try to slow down a Mercator map (first quick solution) in charge of reading a MQM queue, each message being transferred into files, each file having a timestamp expressed in millisecond.
Sometimes 2 messages are read in just 1 millisecond, causing the first to be overwrited by the second.

Do you have an idea ?

Thanks a lot.
 
This is the first time anyone every asked me to make a map run slower :). Did you purchase the license for more CPUs?

What OS are you on and what version. There are different solutions for Windows and UNIX. Adding CPUs should not make the map run faster, since we only run one thread per map per CPU, but more CPU's mean more threads. You could single thread the map.

Other solution, if MID is unique or CID or HMID, use that as part of the file name.

UNIX use the sleep command in an shell script call, but I think this has a minimum of 1 second. You could write a clone rule in an intermeadiate card, with e scope of card, that would slow doen the execution of the map, and by changing the number of clones, vary the delay.

I haven't had my tea yet so I don't have any more ideas, now,



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Thanks,

I run on a Sun Solaris 5.7, Mercator 6.7.

What do you mean by MID/CID/HMID ?

Indeed, the sleep Unix command has not the right granularity (1s).

Thanks !
 
Ask your MQ admin. MQ MessageID for one. they can be unique, depending on the system that creates them.

You didn't answer the question about the extra CPU license.

If you are on 6.7, get to 6.7.1 or better yet, 7.5.1.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
This quite interesting. If you wanted to slow down using the map and not any script try using the GETANDSET function. I was able to play with it, add numbers to it then test for certain numbers. You can use this as a time holder. I just did not pay attention as to measuring time.
 
Or you could call a RUN map that does a lot of work. I would look to a solution that does not cause a speed reduction, but allows the file name to be more unique.

I l:)ve how the question about licensing gets ignored.





BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
If you're reading multiple messages, the simplest way is to add the index of the message to the end of the timestamp. That way, even if you create 2 files with the same time they will have an extra 1, 2, etc on the end of the file name.
I have used this successfully on a number of occasions.
Jan
 
Great answer. No performance loss and gets the job done. We have an opening in Support you know :)



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
BocaBurger,
Thanks for the offer but I prefer the UK.
Cheers
Jan
 
We do have a UK office. But it's 78F today and I would rather be at the beach.

BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
Hi !

Sorry for the delay...

Bocaburger: about the licenses, I imagine this is ok, but fees for application is not my business.

The answer about how to slow down a map is in fact very simple: just set the 'MapDelay' parameter in the Integration Flow Designer.
This value is expressed in milliseconds.

Cheers
 
That does not slow down a map, it only delays the time between the trigger occuring and the map running. Since it applies to every instance of the map, the output file names will still have the same problem.

About the licenses, not OK unless new ones were purchased. Since you are "IS/IT Mamagement" you are responsible, in general if not in specific.



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
As one of the output filename section being set with FROMDATETIME(CURRENTDATETIME...) and the executing delay being minimum 200ms (value for the MapDelay parameter), the output filename is unique, like it was (without playing with delay) with version 6.5 of Mercator.
 
This would only work if you are running the map from another map. If that's the case I'm surprised you had the problem in the first place.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top