ADSM-L

Re: ADSM/AIX messages

1996-10-18 15:35:03
Subject: Re: ADSM/AIX messages
From: Chuck Tomlinson 793-0730 <chuckt AT AUSTIN.IBM DOT COM>
Date: Fri, 18 Oct 1996 14:35:03 -0500
Automatic digest processor <LISTSERV AT VM.MARIST DOT EDU>  writes:
>That works OK for us except that:
>2)      dsmadmc -console has a very bad habit of cutting messages in multiple
>lines, even if working in a batch environment, which makes it difficult to
>capture a "whole" message. (IBMers, is there a way I do not know to overcome
>this?)

There is one other thing I forgot to mention about the perl script that
monitors
dsmserv.  When reading in the line, I have noticed that most (if not all) of
the error messages end with a period ('.').  I wrote a perl function to handle
this.  I'll include it in this message.

Hope this helps;
Chuck T.

# Main program that reads input
while ( <CONSOLE> ) {
   .
   .
   .
   # if it is an ANR message I want to do some thing with
      $line=$_;
      &check_eol;
   .
   .
   .
}

sub check_eol {
    # check to see if this is the end of the message, if not read the next
    # line and add to the end of this one. We are assuming that the \n has
    # been chopped off of the var. $line by the time it gets here.
    #
    # ADSM ends its messages with a period, so we keep adding lines till we
    # get a period to end the sentence.
    #
    $line =~ s/\s*$//;                       # Remove trailing spaces.
    $test_line=$line;
    while ( chop($test_line) ne "." ) {
            $next_line=<SRVR>;               # Grab next line to get rest.
            chop($next_line);                # Remove \n (new line).
            print CONSOLE $next_line,"\n" ;  # Print lines to the console file.
            $line=$line." ".$next_line;      # Add on next line.
            $test_line=$line;
        } # End of while
    $line=$line;                             # This may not be needed
} # End of Subroutine check_eol

<Prev in Thread] Current Thread [Next in Thread>