ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Removing first line from a csv file

Post new topic  Reply to topic
 Removing first line from a csv file « View previous topic :: View next topic » 
Author Message
RaviKrG
PostPosted: Wed Oct 15, 2008 10:43 pm    Post subject: Removing first line from a csv file Reply with quote

Master

Joined: 07 Sep 2008
Posts: 240

Hi All,

I have a input csv file which consist of data something like :

"Record","Fname","Mname","Lname","Batch"
"rec1","ABC","PZV","MNO","BC33"
"rec2","XYZ","PTY","SD","BC34"

First line is just the simple heading but I want to remove it during processing.

How can I remove the first line form this so that the outfile file consist of only

"rec1","ABC","PZV","MNO","BC33"
"rec2","XYZ","PTY","SD","BC34"

Thanks
Back to top
View user's profile Send private message
sebastianhirt
PostPosted: Thu Oct 16, 2008 12:35 am    Post subject: Reply with quote

Yatiri

Joined: 07 Jun 2004
Posts: 620
Location: Germany

You might for example read the whole shebang with the MB6.1 File Input Node, and have the MRM Parser Parsing it. Then you might just use some ESQL or Java and delete the unneeded parts of the Message.

Is this the sort of answer you were looking for?
Back to top
View user's profile Send private message
RaviKrG
PostPosted: Thu Oct 16, 2008 12:43 am    Post subject: Reply with quote

Master

Joined: 07 Sep 2008
Posts: 240

Thanks sebastianhirt

Yup ! You can say so but is it really required only to delete the first row ?

Is there any other way
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Oct 16, 2008 3:49 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You can model the header row as a different, non-repeating, element in your csv file.

Then you can fail to copy that to the output message, or otherwise ignore it in your processing.

Your model should match your data's logical structure. If that logical structure includes a header, then so should your model.
Back to top
View user's profile Send private message
sebastianhirt
PostPosted: Thu Oct 16, 2008 3:53 am    Post subject: Reply with quote

Yatiri

Joined: 07 Jun 2004
Posts: 620
Location: Germany

RaviKrG wrote:
Thanks sebastianhirt

Yup ! You can say so but is it really required only to delete the first row ?

Is there any other way


If your header record has a fixed length, you might as well not parse at all, and cut the required length from the BLOB (e.g. the SUBSTRING ESQL function might do the trick for you)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Removing first line from a csv file
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.