Hai Everyone,
I am requiring a solution for this problem. I got a field name as "POLICYNO", the content of the field resembles like 1234, 1234-01, 1234-02, 236789, 45467, 45456-03.5645.45456-02, 45456-01, 45456.
In the above example 1234 is the primary record, and the 1234-01, 1234-02 are the two child records. I want to reject both the parent record (1234) and the child record (1234-01, 1234-02).
The complexity involved in this query is, i need to extract the value that exist before this symbol "-" into a sequential file. After extracting I need to give lookup this extracted one in order to extract/reject the child records from the input data. Is there is any function exist to extract the above said values.
We come up with a solution. In first transformer, we appended "-" as a prefix for all the POLICYNO. In the next transformer we used "[] operator" for extracting the values that exist between two "-", extracted to a sequential file. By keeping this sequential file as a lookup, we rejected both the parent & child record.
Is there is any other solution to increase the code efficiency
Thanks in advance....
Regarding Content validation
Moderators: chulett, rschirm, roy
Please delete one of your posts on this topic.
Firstly - the actual value of one field "1234, 1234-01, 1234-02, 236789, 45467, 45456-03.5645.45456-02, 45456-01, 45456" or does that represent multiple rows?
If multiple rows then using Field with the delimiter set to "-" and selecting the first "field" of that input will give you the value before the hyphen.
This will however also give you values where there is no hyphen in the input value, so you might want to check for a hyphen in the field beforehand.
Firstly - the actual value of one field "1234, 1234-01, 1234-02, 236789, 45467, 45456-03.5645.45456-02, 45456-01, 45456" or does that represent multiple rows?
If multiple rows then using Field with the delimiter set to "-" and selecting the first "field" of that input will give you the value before the hyphen.
Code: Select all
eg Input.String["-",1,1]
This will however also give you values where there is no hyphen in the input value, so you might want to check for a hyphen in the field beforehand.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: