View Full Version : Having trouble creating floating trap with '|' delimiter
kcnickel
November 13th, 2009, 12:10 PM
I have some reports that have the '|' character (character above the '\') as the delimiter, but Monarch doesn't seem to recognize this character when I put it in the trap field. I'm using Monarch Version 9.0. Is there a way to create a floating trap with data in the following format?:
08/03/2009 09:50:53|wiretransfersent|ABCDE2626|ANNAR|6894|08/03/2009|
Thanks,
John
Nick Osdale-Popa
November 13th, 2009, 12:24 PM
If you were using Pro, you could open the file as a database using the pipe(|) as your delimiter.
I'm not sure if it was introduced in v9 or v10, but in the options, you can select an alternate set of trap characters, freeing the pipe character to use like any other type of trap.
Another option would be to trap the whole line and then use LSplits() and RSplits() to retrieve the data from that long character field. This can get hairy especially if the data itself is pretty long.
kcnickel
November 13th, 2009, 12:36 PM
The Database option worked. Thanks!
OllyInMunich
November 13th, 2009, 01:22 PM
Hello John,
In many cases a pipe "|" delimited file will work OK as a Database input, as long as you have Pro.
If the requirement is more complex - as with many SAP reports which make extensive use of | as a spacer - then floating trap won't normally work for the "|" character.
This is because Monarch defaults to using the "|" character in a trap line to indicate a "Numeric Or" trap, which can't be combined in with a floating trap.
The way around this is in Options > Input, select "Alternate" trap characters. Then you can the use usual wildcard trap characters as literal traps, even in floating traps.
HTH,
Olly
Powered by vBulletin™ Version 4.1.0 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.