on 04-18-2010 10:46 PM
Hi Experts,
I need to pick a report file which is in the below given format. I am using PI 7.1 Sender File (FCC) to do this. First six lines are of no use to me, so I am putting Document offset as 6 in Sender File Adapter. But the last line says "END OF REPORT". I have couple of questions.
1. Is there any way to handle the last line END OF REPORT. I am thinking of using a before processing OS command to remove it. Is there any better way to do it?
2. This file contains around 3000 lines. I should not process the lines where second coloumn is not numberic (eg. for Test Bank3 - A789). How to do this in PI 7.1. I am using Graphical Mapping.
3. If there are any special characters (eg. for Test Bank4), Ignore that line and process others. Can I have a log of ignored lines?
Sample File -
"RPT TRIALB XYZ LIMITED"
" TRIAL BALANCE"
" FOR THE PERIOD ENDED DECEMBER 2009"
""
""
""
"","Test Bank1","123",100
"","Test Bank2","456",200
"","Test Bank3","A789",300
"","||Test Bank4",111,400
--
--
--
--
END OF THE REPORT
Achtuth,
1. Is there any way to handle the last line END OF REPORT. I am thinking of using a before processing OS command to remove it. Is there any better way to do it?
-- Mapping is the best way to do it
2. This file contains around 3000 lines. I should not process the lines where second coloumn is not numberic (eg. for Test Bank3 - A789). How to do this in PI 7.1. I am using Graphical Mapping.
-- Easily can be achieved in mapping program, we need the structure in order to give the exact solution.
3. If there are any special characters (eg. for Test Bank4), Ignore that line and process others. Can I have a log of ignored lines?
--Even this one has to be handled in mapping program, but I'm not understanding what you mean by logs, do you want them (special characters rows)to be written to a file ?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
Thanks for your reply...Can you please let me know:
I have removed the last line "END OF REPORT" manually and processed the file using the Sender File (FCC). It works fine and process all the below given 4 records.
My requirement is :
1. I need to remove the last line using mapping program. How can I achieve it? Document Offset ignores lines from top. Is there any parameter if FCC to ignore the lines from bottom?
2. How can I ignore 3rd record as it got alpha numeric in its second column (Account number = A789). What functions should I need to use in graphical mapping to ignore this?
3. How can I handle if there is any special character in the file. eg. In the 4th record before Test Bank4 there is a special character. because of this my interface is failing.
I have created a structure like
Sample File-
Test Bank1,123,100
Test Bank2,456,200
Test Bank3,A789,300
||Test Bank4",111,400
--
--
--
--
END OF REPORT
-
Data Type
<RecordList>
<Records>
</BankName>
</AccountNumber>
</Amount>
</Records>
</RecordList>
FCC Parameters
RecordList,1,Records,*
Records.fieldseparator = ","
Records.endseparator = "nl"
Records.fieldnames = Bankname,Accountnumber,Amount
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.