|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Parsing UnReadable File Using IIB |
« View previous topic :: View next topic » |
Author |
Message
|
apmohan |
Posted: Fri Sep 28, 2018 3:51 am Post subject: Parsing UnReadable File Using IIB |
|
|
Apprentice
Joined: 28 Dec 2012 Posts: 27
|
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 |
|
 |
Vitor |
Posted: Fri Sep 28, 2018 5:21 am Post subject: Re: Parsing UnReadable File Using IIB |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, 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 |
|
 |
apmohan |
Posted: Fri Sep 28, 2018 11:56 am Post subject: |
|
|
Apprentice
Joined: 28 Dec 2012 Posts: 27
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|