dickiebird
Programmer
Hi guys
We receive s.w.i.f.t files daily, contents are like :-
{1:F01FRED3322AXXX7279625440}{2:O8011651031208RNNSZAJJAXXX29021728160312081451N}{4:
:20:5998RBRB00064AUD
:28:00064/01
:51C:/405605
:23:F188-148011
:30:031205
:26A:AF4419070/9075
:26A:ZD8193201/3222
:33B:AUD2500,
:34B:AUD2500,
:16A:1
:51C:/407513
:23:F172-33074
:30:031205
:26A:CG2365554/5564
:33B:AUD1100,
:34B:AUD1100,
:16A:1
On the :51C: line the reference code provided has to be changed for some senders, I'm thinking of using a lookup table e.g. mylookuptab, contents like :
:51C:/405605 :51C:/ABC1
:51C:/407513 :51C:/ABC3
:51C:/405612 :51C:/ABC2
:51C:/405615 :51C:/ABD1
:51 .. etc etc
This is a small sample, there could be a hundred to change.
I could do a for loop, and sed for each code in the lookup table......
But can anyone suggest a neater solution - awk? sed? tr?
Thanks in advance
Dickie Bird (
-)))
We receive s.w.i.f.t files daily, contents are like :-
{1:F01FRED3322AXXX7279625440}{2:O8011651031208RNNSZAJJAXXX29021728160312081451N}{4:
:20:5998RBRB00064AUD
:28:00064/01
:51C:/405605
:23:F188-148011
:30:031205
:26A:AF4419070/9075
:26A:ZD8193201/3222
:33B:AUD2500,
:34B:AUD2500,
:16A:1
:51C:/407513
:23:F172-33074
:30:031205
:26A:CG2365554/5564
:33B:AUD1100,
:34B:AUD1100,
:16A:1
On the :51C: line the reference code provided has to be changed for some senders, I'm thinking of using a lookup table e.g. mylookuptab, contents like :
:51C:/405605 :51C:/ABC1
:51C:/407513 :51C:/ABC3
:51C:/405612 :51C:/ABC2
:51C:/405615 :51C:/ABD1
:51 .. etc etc
This is a small sample, there could be a hundred to change.
I could do a for loop, and sed for each code in the lookup table......
But can anyone suggest a neater solution - awk? sed? tr?
Thanks in advance
Dickie Bird (