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

Index issue

Status
Not open for further replies.

oscarse

Programmer
Apr 9, 2006
99
CA
the 856 Ansi Standard has a Hierarchial structure of
HL (0:200000) that requires at least 3 different structures

adding a header structure is fine as there is only one index ... the other two levels are where this gets ugly

Assuming a Shipment has multiple orders with multiple items we would have:

Shipment
Order (s)
Item (s)

HL 1 S Shipment
HL 2 1 O Order 1
HL 3 2 I Item 1 Order 1
HL 4 2 I Item 2 Order 1
HL 5 1 O Order 2
HL 6 5 I Item 1 Order 2
HL 7 5 I Item 2 Order 2

As the the functional map appears to only be able to pass a Function in once on an index field:

HL (0:1) <Shipment details>
HL (0:199999) = MakeOrder(<Order Details>)

How do we pass in the third (Item) Structure?

Passing both Order and Item details in is an issue because the functional map only has ONE index available
HL (0:1) <Shipment Details>
HL (0:199999) = MakeOrderItem(<Order Details>,<Item Details>)

or defining Order as ORDER with ITEMS still has the same issue of the functional map only has one index available

What I have done for the moment is combined my input Card for ORDERS and ITEMS into one structure with a
StructureType field to discriminate the data being passed into the MakeOrder

Am I missing a concept here or is this a limitation of the Mercator Index processor?

 
Can you just add an extra input card to your functional map?

you might need to do something messy like pass down the previous index value and add one, e.g. something like:
index:HL Segment[LAST]+1

but should all be possible.
 
what I did was in my type tree I partitioned the HL loop and added multiple HL loops nameing them Order, Items and etc. Than adding these loop segments under the appropriate segment. Example. the last segment in my shipment HL loop I added Orders, then under my order HL loop I added Items. This gave me the capability to create sub maps for multiple orders and Items.
 
Looking at your data structure I don't see why you need to wory about indexes. For each Order you pass the Order and Items to a functional map and within ththat functional map pass each item to another functional map.
 
Thank you all for your time/help it is appreciated

Please also pardon my confusion ... I am still not getting past my vision of the world :(

The issue in my mind is the 856 type tree assigns one structure HL that can be repeated up to 200000 times ... where as the implementation requires a nested structure of 3 differing HL type structures

I guess my thoughts are also that the ansi type tree is supposed to be STANDARD and therefore in my mind should not be touched

Although I have the ability to change my data model/Structure design from our enterprise system I would very much like to get passed this road/mental block.

As stated in my first post, I combined the Order and Item structs into one Structure with a StructureType Field which should allow me to use only one functional map ... though I am still waiting for test data to prove this


Ollyc
If we add another input card to the functional map would it not still require some way to determine what type of HL loop is required? Also how does the concept of NEXT index apply as there is not really an index, Mercator just knows somehow to add another HL segment to the output stream based on I assume the number of input instances being passed into the Functional map.

Stella001 ... when you say "partioned the HL loop" I envision that you modified the 856 type tree.
I see the diamond shaped tree objects as "Partitioned" but am not clear enough on the Partitioning rules to attempt changing this part of the tree. I am rereading the help files on partitioning ... maybe this will shed some light

janhes
My understanding of the Function map is all the input cards must match the output ... the 856 type tree has one HL (0:200000) segment which from my experience allows only one functional map call

HL (0:1) Shipping
HL (0:199999) Orders (s) (Where an Order has Item (s))

the Resulting Functional map only gives us one HL segment/index (instance) so how do I add another Functional map from inside the first functional map?

From my conceptual view of this process I can only see this working if the 856 type tree is modified so the HL data type is defined as a Group and then combined (partitioned) something like;

HLS (0:1)
HLO (0:199)
HLI (0:1000)

What my old neurons would like is to be able to create a functional map that uses HL (s) as the next output card so;

HL (0:1) is shipping
HL (0:199999) makeOrder(Order,Item(s))

FunctionalMap makeOrder

HL (0:n) is Order
HL (0:199999-n) makeItem(Item)

FunctionalMap makeItem
HL (0:n) is Item



 
You need to define your different record types in the TypeTree using identifiers or partitioning.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top