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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mercator Component rule trouble...

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,
I've been using Mercator for about a month now. I'm having problems with a fairly complicated component rule which basically concatenates two adjacent records together if they contain 2 identical fields (of 3), the sum of the third fields being mapped. For example:

Product name Product Description Quantity
Eggs Dairy Produce 100
Onions Vegetables 50
Onions Vegetables 80
Potatoes Vegetables 25
Eggs Dairy Produce 40

Would give this output:

Product name Product Description Quantity
Eggs Dairy Produce 100
Onions Vegetables 130
Potatoes Vegetables 25
Eggs Dairy Produce 40

The 2 'eggs' records should not be consolidated since they are not adjacent. The rule I have been advised should work is this:

Name Field:$=Name Field:$[LAST] & Description Field:$=Description Field:$[LAST] & Quantity Field:$=Quantity Field:$[LAST]

Which should consolidate a record with the preceeding one if the name field and descriptoin field are the same. However, it doesn't work at present. Apparently the type tree structure is very importnat for this rule to work, which is:

Root
File Data
|
Record (1:s)
|
Header Record
Detail Record (1:s) - rule here
|
relevant fields...

so the rule concerns data fields within a series group, within a series group. I understand what this rule is trying to achieve, and I have been advised that this rule has worked in the past, but I don't understand how exactly it is meant to work - it seems to me this is merely a qualifying rule, stating that the data must be equal to that in the preceeding record. However, if this was the case,I would expect Mercator would throw up an error, which it doesn't. Can anyone a) understand what I am talking about
b) explain any of this to me
c) suggest any other way of simply concatenating two records when certain criteria are met
d) offer any other advice/help
e) point me towards the asylum.

If anyone can help me in any way I would greatly appreciate it, this is driving me nuts!

Cheers,
Martin
 
why do u crib about uselessness about others, in case u want free advice have patientce, someone who has used the software can guide u, else pay a few grands to a consultant and have the problem solved rightaway



%-(
 
You talk (badly, by the way) about patience. Don't you think a week is long enough? Don't you think it would be curtious for someone to say something in response, even if it was not helpful?
I'm just trying to get a solution to my problem. If you can't help, say so.
Don't crow to me about being patient, when it didn't take long for you to post up a reply after I had a pop at you.
Stop whineing and do your job.
Edi bod
 
Martin: have you had any luck with this yet?

Have you actually seen this rule work in the past? Do you know for certain that it did?

My initial thought is that the map should have some of the logic, not just the type tree; however, you didn't mention any map logic. I would have to look in more detail at it.

Regards

zmemes@netscape.net
 
Firstly your component rule is wrong. Quantity Field:$=Quantity Field:$[LAST]should be ommitted, otherwise you will only get groups where the quantities are equal.
Socondly, you need to create a map which has this file as an input card and an output card which totals the quantities.
If you want to get more support for your Mercator problems, try mymercator.com. This is the forum for Mercator users. Sign up for the forum.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top