MQ Engineering Group > MQSeries-1.33 > MQSeries::FDC::Parser

Download:
MQSeries-1.33.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  8
Open  4
View/Report Bugs
Module Version: 1.33   Source   Latest Release: MQSeries-1.34

NAME ^

MQSeries::FDC::Parser -- Parse a portion of an MQSeries FDC file and return parsed Entry objects.

SYNOPSIS ^

  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;

DESCRIPTION ^

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.

METHODS ^

new

Create a new MQSeries::ErrorLog::Parser object. The constructor takes the filename as its argument; this filename is only used for error messages.

parse_data

Parse a chunk of text with one or more FDC entries and return individual parsed entries.

SEE ALSO ^

MQSeries(3), MQSeries::FDC::Tail(3), MQSeries::FDC::Entry(3)

syntax highlighting: