MQSeries::FDC::Parser -- Parse a portion of an MQSeries FDC file and return parsed Entry objects.
use MQSeries::FDC::Parser; my $parser = MQSeries::FDC::Parser->new("AMQ09151.0.FDC"); open (FDC, '<', "/var/mqm/errors/AMQ09151.0.FDC"); local $/; my @entries = $parser->parse_data(<FDC>); close FDC;
The MQSeries::FDC::Parser class is typically not used directly, but invoked through the MQSeries::FDC::Tail class. When used directly, it can be used to parse a (possibly archived) FDC file and return an array of neatly-parsed MQSeries::FDC::Entry objects.
This class will try and deal with the vagaries of error-log processing, chief of which is that the MQSeries FDC is not written to in an atomic fashion, meaning that some error-log entries may be incomplete. In this case, the incomplete part is saved and prefixed to the data supplied in the next call. For this reason, you must create an individual Parser object for each file that is processed.
Create a new MQSeries::ErrorLog::Parser object. The constructor takes the filename as its argument; this filename is only used for error messages.
Parse a chunk of text with one or more FDC entries and return individual parsed entries.