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 IndexWebSphere Message Broker SupportParsing UnReadable File Using IIB

Post new topicReply to topic
Parsing UnReadable File Using IIB View previous topic :: View next topic
Author Message
apmohan
PostPosted: Fri Sep 28, 2018 3:51 am Post subject: Parsing UnReadable File Using IIB Reply with quote

Newbie

Joined: 28 Dec 2012
Posts: 4

We have a requirement to extract some data from a report file which has multiple pages. Which approach can be followed to parse this file and generate a flat file ?

<------------------ M A J O R R E C O R D D E T A I L S ------------------>-<--------- E R R O R D E T A I L S ---------->
TRANSACTION TYPE SEQ. HOMING HOMING ACC. AMOUNT USER HOMING ACC.! FLD FIELD DESCRIPTION OF ACTION ERR
NO. BRANCH NUMBER REFERENCE NAME ! NO. CONTENTS ERROR CODE
------------------------------------------------------------------------------------------------------------------------------------
! 08 1 INVALID ACCOUNT TRANSACTIONS 3
! TYPE HOMED BACK
!
!
52-DIRECT DEBIT 2485 08=40=72 00249708701 103 962,50 STANCOM - !
-CONTRA ACB IMPRES !
T ACCOUNT !
!
ACTION DATE:- 18/06/25 ! LOWEST ERROR CODE FOR TRANSACTION SET:- 3


Please help

Thanks in Advance[/img]
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Fri Sep 28, 2018 5:21 am Post subject: Re: Parsing UnReadable File Using IIB Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25361
Location: Ohio, USA

apmohan wrote:
We have a requirement to extract some data from a report file which has multiple pages. Which approach can be followed to parse this file and generate a flat file ?


A report file typically has some kind of structure you can map. The example you post appears to have columns so you can use whitespace as delimiters between data items, and characters to discriminate between header lines, blank lines and data lines. I've done this with a mainframe report that had columns of data set names, backup dates and other such information. It was much more straightforward than the example you post and was a PITA to get right!

Having said that it can be done, you'll have to do it long hand (none of the wizards will help), there will be a certain amount of trial & error and there will be future instances of the report where it won't work all the time. IMHO the TCO of doing this is likely to exceed the TCO of modifying whatever generates this to produce a machine readable version. You should absolutely push back against trying to parse this.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
apmohan
PostPosted: Fri Sep 28, 2018 11:56 am Post subject: Reply with quote

Newbie

Joined: 28 Dec 2012
Posts: 4

Thnx Vitor.

I will check with client to get more understanding on this and get back with an update.

tnx once again.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportParsing UnReadable File Using IIB
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.