how to extract file name and insert as a header in flat file (Full Version)

All Forums >> [Ask XML questions here] >> BizTalkers



Message


Jay -> how to extract file name and insert as a header in flat file (16 January 2008)

Hello,

I want to extract the name of the file and i want to insert the file name as a header in the Flat File . Currently my file does not have a header . Please tell me how should i do this

I have created source and destination schema with the orchestration and i want to make this modification inside the orchestration
Orchestration consist of Receive port and shape then i have construct shape, Inside the construct shape i have Transform message shape and below that i have Message Assign shape and then  send port  

Inside the Message Assign shape i have
 
//xpath(PendingWithHeaderMsg, "//Header") = PendingNoHeaderMsg(FILE.ReceivedFileName);
xpath(PendingWithHeaderMsg, "/*[local-name()='TransactionPending']/*[local-name()='Header']") = PendingNoHeaderMsg(FILE.ReceivedFileName);

Please help me urgent

Thank you
Jay




Siva -> RE: how to extract file name and insert as a header in flat file (25 January 2008)

are you still looking for a ans?




Jay -> RE: how to extract file name and insert as a header in flat file (25 January 2008)

Hello Siva

Yes I am still looking for an answer. I want to strip the file name and insert it as a header in the file. I did lot of things created orchestration and special schemas but it did not work. At some point i was able to get the path and the file name in the header but i dont want that i just want the file name inserted as a header in my CSV files

File name "Cash Balances As Of 01-03-2008.Csv" 

Example
1-3-2008     <<<----- Header
1/3/2008,19-2360,ACTIVEPASSIVE INTL EQUITY FUND,Open,0,0,0,100000,100000
1/3/2008,19-2362,ACTIVEPASSIVE EMERGING MK/FUNDQUEST,Open,0,0,0,99900,99900

Thank you for your help in advance
Jay




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.125