cancel
Showing results for 
Search instead for 
Did you mean: 

VCF4 file format to file scenario

manikandan_shanmugam3
Active Participant
0 Kudos

Dear All,

Scenario :VCF4 (File) to file scenario

VCF4-Visa Commercial Format version 4.0

Requirement:

PI have to Pick and process the VCF4 format file.

1 - VCF4 has a three record types 5  ,7 and 8 and this 3 record types data/rows are interrelated  (Identifier for Record types are RT5,RT7 and RT8)

2  - Record type 7 can be repeated multiple time whereas 5 and 8 will not repeat

3 - Each record type has 3 levels of data  A, B and C and these levels can repeat multiple times in each record type

4 -  first we have to traverse to a record type 5-> then fetch all level A record as Level A records will be available only in record type 5

5 -  then we have to traverse to Level B records in record type 5 and fetch all the columns , each Level B records has a Unique Identifier, Using this Unique identifier, we have to traverse to Record Type 7 and search for the related Level B records , then traverse to a Record Type 8 and search for a related Level B records using the same unique Identifier ...so on for all the Level B Records.

6- Once we done with the Level B Records, then we have to repeat a above point 5 for C too.

Below are the step by step approach:

Steps to find the Level B record

Step 1: Search for Record Type 5

Step 2: Search for Level B

Step 3: Search for Unique identifier of each record of Level B (Eg:1234-Unique Identifier) for record type 5.

Step 4: Search for Record Type 7

Step 5: Search for Unique identifier in record type 7 that was found in Record type 5 (Eg:1234-Unique Identifier) and read that record.

Step 6: Search for Record Type 8

Step 7: Search for Unique identifier in record type 8 that was found in Record type 5 (Eg:1234-Unique Identifier) and read that record.

We need to travers through record type 5 , 7 and 8 and with the help of unique identifier, then combine records of these three record types to form one final record.

Same have to be repeated for all the level B and C records one by one

Also find the attached screenshot for more explanation and let me know the better approach for this integration.

Note: VCF4 is a tab seprated file and for explanation we used Excel in below diagram

Thanks,

Mani

Accepted Solutions (0)

Answers (3)

Answers (3)

iaki_vila
Active Contributor
0 Kudos

Hi Manikandan,

At first i confess that i dont understand your requeriment completly. I suggest some tips, do you need to transform the source file?, if it is not neccesary you can copy the file from the source to the target and there is not neccesary to do any ESR development. If you need to make some changes, i guess that with the logic that you explain, with the file content conversion is quite difficult, may be impossible, to do all the required transformation, the idea would be to use file content conversion in order to get an intermediate XML version (form example one tag per line) and later with a java mapping you could apply your algorithm to get your goal.

Regards.

manikandan_shanmugam3
Active Participant
0 Kudos

Dear All,

your input is required on the above scenario to understand the different approach to achive this.

anupam_ghosh2
Active Contributor
0 Kudos

Hi Manikandan,

                        First use an FCC to read the file line wise. Thus after FCC the content will look something like this

<MT_File>

      <ROW>Row2A\tROW1A\tROW1A\t123-Unique Indentifie\tLevelA\tROW1A\tROW1A</ROW>

    

      <ROW>Row1B\tROW1A\tROW1A\t123-Unique Indentifie\tLevelA\tROW1A\tROW1A</ROW>

    

      <ROW>Row1C\tROW1A\tROW1A\t123-Unique Indentifie\tLevelA\tROW1A\tROW1A</ROW>

</MT_File>

Now use a  java mapping to read each row , \t (TAB) will help you identify each field. Then you need to search over rows to find the next link. The only way you can search within contents of the file is using sequential search within consecutive rows. The mapping code will produce as output the required values in same message format (with column names). The algo to search is bit complicated but is achievable.

Regards

Anupam

manikandan_shanmugam3
Active Participant
0 Kudos

Dear Champs,

Any suggestion on above scenario?

Regards,

mani