cancel
Showing results for 
Search instead for 
Did you mean: 

Possible with FCC?

Former Member
0 Kudos

Hello All,

I have a File -> PI -> DB scenario.

I am having difficulty with the CSV file structure.

-


INFO_LINE ... 1

INFO_LINE ... 2

INFO_LINE ... 3

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

CUSTOMER :,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

CustName,,,Address1,Address2,,,,,,Phone

John,,,New York,USA,,,,,,+1-888-111-2222

George,,,Seattle,USA,,,,,,+1-253-123-1234

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Number of Customers : 100,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Provider :,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

ProviderName,Location,S-Id,,,,,,,,,ClientStatus

ABC,Seattle,1234,,,,,,,,,Paid

XYZ,Dallas,0121,,,,,,,,,Partial

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Number of Providers : 42,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

-


1. All the lines which has been striked, is not required.

2. You might notice that there are few extra commas in between fields. I can't take away these extra commas because there can be a situation where a valid field value is coming as blank.

3. CUSTOMER and PROVIDER are at the same level of hierarchy.

4. CUSTOMER and PROVIDER will occur only once in the file, but of course, they will have multiple "line items" or "rows" in them.

Hope I am able to explain my scenario.

How this can be achieved using FCC? Kindly help me get through this.

Thanks,

Abhi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Abhi:

You can solve the problem step by step:

1. Design a simple structure which is easier for FCC, your purpose is to pick up all the data, including the striped lines.

e.g. +Records 1:1

++Record 0:n

+++FLD0 0:1

+++FLD1 0:1

+++FLD2 0:1

........

2. In your FCC parameter section, just put the simple parameter like:

Document Name: Your Message Type, e.g MT_MyMsg

RecordSet Name: Records

RecordSet Structure: Record,*

Record.fieldSeparator: ,

Record.endSeparator: 'nl'

Record.fielsNames:FLD0,FLD1,FLD2.......

Once you make it working, post the payload for me, I will guide you through the solution

Regards.

Liang

Edited by: Liang Ji on Mar 25, 2010 9:37 PM

Former Member
0 Kudos

Thanks Liang and Raj.

@ Liang - I don't require the striked out rows. My concern is, how I should tell the File Adapter from where the CUSTOMERS segment starts and from where the PROVIDERS?

Also, in the end of each segment, there is a row that is not required (please refer my previous post).

@ Raj - The column size is different for CUSTOMERS and PROVIDERS.

Also, how to take care of the those blank fields, which actually are not associated with any field?

Thanks for your precious time.

--Abhi

Former Member
0 Kudos

Abhi:

I understand your requirements, what I want you to do to use simple FCC to pick up file, as long as you pick up all the data from each line, you can tell how the striped line look like, I am guessing that only FLD0 has value, and there is no value from FLD1.

Once you determined this, in your interface mapping, you can have two message mapping programs, the first one is just to remove the triped lines, I have done this before and it really work well for me.

My scenario is EDI scenario, once we have designed the interface, when we do the testing, the real file always has blank line in between. There are two options for us: 1) write OS script to remove the blank line, 2) Add additional mapping program to remove blank line, I used the second option, so that I do not have to maintain OS level scripts since we had both Unix and Windows envrionments.

If you want to have try, just go ahead as what I replied you, then you can design your two mapping programs.

Regards

Liang

justin_santhanam
Active Contributor
0 Kudos

Hi Liang,

Even I'm also thinking of having the same way of design Two Mapping programs in one Interface Mapping ...

Raj.

Former Member
0 Kudos

Hi, Raj:

Nice to see you here again.

I am off the forum for a long time since very busy project since last year

Regards

Liang

Former Member
0 Kudos

Hello Liang,

Thanks for your response.

I am guessing that only FLD0 has value, and there is no value from FLD1.

I guess I am unable to make my point clear. I will try to explain again.

There are 5 fields, namely - FLD0 ... FLD4.

But in between these, there are blanks. These blanks don't belong to any field as such or they are not corresponding to any field. But this is for sure that these number of blanks will remain the same in the file, for example - 10 blanks for Customers and 8 blanks for Providers.

So, there are values after FLD0. Hope this makes my point more clear.

I used the second option, so that I do not have to maintain OS level scripts since we had both Unix and Windows envrionments.

Yes, I would like to go for mapping option as I don't want to keep on the OS level ... our OS is Linux.

I will do a basic FCC and try to pick the file. I will see how that comes up and then I will share the details with you. I guess I might do this over the weekend, so will get in touch with you early next week.

Thanks once again!

-- Abhi

Former Member
0 Kudos

Opened a new thread -

Thanks,

--Abhi

Answers (1)

Answers (1)

justin_santhanam
Active Contributor
0 Kudos

Abhi,

We can remove the first 6 lines by using document.offset = 6. Please answer the below question.

For rest of the fields(Starting from 7th row to end of the file)

The column size is going to be same?

Is it ok if you can take all the data from 7th row and strip down later in the mapping program?

Thanks!