Description from Restriction list

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
dstx_1
Participant
Posts: 4
Joined: Sun Dec 31, 2006 3:41 pm

Description from Restriction list

Post by dstx_1 »

Hello,
I am new to Datastage and need some help with map designer. I need to know if there a way to do a lookup in the map on the element restriction list ?.


For Example :
In a X12 210 invoice, there is a element BilledRatedAsQualifier and it has a include restriction list as follows:

Include Description
BA Barrels
BX Box.

In my map, when I encounter value BX , I need to display "Box" in my output file instead of the value "BX"

Thanks in advance for your help
boblopez1
Participant
Posts: 15
Joined: Fri Mar 10, 2006 1:34 pm
Location: Pennsylvania

Post by boblopez1 »

Welcome Aboard, you'll notice that with TX there are many ways to skin a cat the simplest in this case is:

=IF(BilledRatedAsQualifier="BX","Box")

Regards,
Bob Lopez
dstx_1
Participant
Posts: 4
Joined: Sun Dec 31, 2006 3:41 pm

Description from Restriction list

Post by dstx_1 »

Bob, Thanks! for the response. But there are lot of values possible for BilledRatedAsQualifier and each one of them has a different description. The only place these values and it's description is available is in the Restriction list that is setup for this element.

I was hoping to read the value from the Inbound 210 X12 file and do a lookup against the restriction list to get the description.

Therefore what I was looking for was a way to access the restriction list from the map.

Thanks
jvmerc
Participant
Posts: 94
Joined: Tue Dec 02, 2003 12:57 pm

Post by jvmerc »

As far as I know you can't refer to the description. You can refer to the 'include' value that the description defines.

Use the member function......

something like

if(member(element:with:include_value, {"XX", "ZZ", "30"}),
do process,
else do whatever)

If you bring up the function window in the map it will provide an example of how to define/format the rule.
jvmerc
Participant
Posts: 94
Joined: Tue Dec 02, 2003 12:57 pm

Post by jvmerc »

Found this old example from an old 834 map. It converted the larger variety of HIPAA codes to our smaller group of internal relationship codes....

IF (MEMBER (Indiv'lRelationshipCd Element:INS Segment:Input, { "01", "25", "53"}), "2",
IF (MEMBER (Indiv'lRelationshipCd Element:INS Segment:Input, {"05", "07", "09", "10", "11", "12", "15", "17", "19", "23", "24", "38"}),
IF (Gender Field:Dependent:Output = "F", "3", "4"), "5"))
boblopez1
Participant
Posts: 15
Joined: Fri Mar 10, 2006 1:34 pm
Location: Pennsylvania

Re: Description from Restriction list

Post by boblopez1 »

dstx_1 wrote:Bob, Thanks! for the response. But there are lot of values possible for BilledRatedAsQualifier and each one of them has a different description. The only place these values and it's description is available is in the Restriction list that is setup for this element.

I was hoping to read the value from the Inbound 210 X12 file and do a lookup against the restriction list to get the description.

Therefore what I was looking for was a way to access the restriction list from the map.

Thanks
Ok, that makes it a little clearer, what you may want to try is to open the Type Designer for the output field of field let's say UOM. In the properties box for UOM change the restriction to Character and Rule to Exclude. When you bring up the restriction list for UOM you'll notice an Exclude Column and a Reference String column. In the Exlude column you would add as an exmaple BX and in the reference string you would enter Box and do this for all qualifiers. Now when you map you simply map the UOM from the inbound, when the map executes it will produe the output based on the reference string automatically. This is used extensively in XML for Markup delimiters.

Hope this helps.
Bob
jvmerc
Participant
Posts: 94
Joined: Tue Dec 02, 2003 12:57 pm

Post by jvmerc »

If you only need to map the qualifier the tree solution is a good one and it will minimize code changes. Just update the exclude and recompile.

If you need to do more, though, you still need a good rule. Depending on your needs perhaps a combination of tree and rule is a good option.
PS_IND
Participant
Posts: 1
Joined: Sun Jan 07, 2007 11:11 pm

Post by PS_IND »

jvmerc wrote:If you only need to map the qualifier the tree solution is a good one and it will minimize code changes. Just update the exclude and recompile.

If you need to do more, though, you still need a good rule. Depending on your needs perhaps a combination of tree and rule is a good option.
There might be another way. I have never tried it but. Export the tree and create the XML. Use that XML as an input. I think you should see all the qualifier in it. If you do try please respond back, just curious to know.
Post Reply