RE: Pipe search of command procedure log file containing pipe search command. command.command.
- From: "Farrell, Michael" <MFarrell@xxxxxxxxxxxxx>
- Date: Thu, 11 Sep 2008 09:05:34 -0400
Hein,
I must admit my ignorance here.
What is the "seg0_1 2" accomplishing in the convert statements below.
I use segmented keys but have always been taught to write them in the form "seg0_position <position>" and "seg0_length <lgth>", etc.
How does convert see the statement you presented? I cannot find anything like this in the RMS Utilities Reference manual.
TIA,
Mike Farrell
-----Original Message-----
From: Hein RMS van den Heuvel [mailto:heinvandenheuvel@xxxxxxxxx]
Sent: Wednesday, September 10, 2008 10:11 PM
To: Info-VAX@xxxxxxxxxxxx
Subject: Re: Pipe search of command procedure log file containing pipe search command. command.command.
On Sep 10, 9:40 am, norm.raph...@xxxxxxxxx wrote:
Here is a code fragment designed to search the running command procedure
to
see if any of the converts in the log got duplicate error messages.
CONVERT-I-DUP is an informational and NOT reflected in the $STATUS, so
that's a non-starter.
CONVERT-I-DUP is really an annoying obnoxious implementation. I should
have fixed it while I was in the area, but did not realize how bad it
was. A line per record and no stopping the fun! :-(
Commands I used for testing:
To generate dups:
$ convert/stat/fdl="fi;or in;key 0; seg0_l 2"/exc=login.dup login.com
login.idx
To not generate dups:
$ convert/stat/fdl="fi;or in;key 0; seg0_l 2"/exc=login.dup login.idx
login.idx
Two suggestions:
1) always convert with /STAT (which you do) AND also /
EXCEPTION='exection_file' ...
Now you can just use something like
$ IF F$FILE(exception_file, "EOF") .NE. 0
$ THEN
$ MAIL...
$ ELSE
$ DELETE 'F$SEARCH(exception_file) ! Always created, so
clean up last one
$ ENDIF
If that EOF returns non-zero then it is bad.
You probably do not care wether the badness was duplicates or
something else right?
2)
If you are going to spawn anyway, consider a perl wrapper to eat those
annoying duplicate lines.
Here is an initial test version.
Of course you probably want to pass is the command and/or read from a
file.
---- convert_wrapper.pl -----
use strict;
use warnings;
my $dups = 0;
open(STDERR, '>login.err'); # or send to Holland? (NL:)
my $convert_command = q(convert/stat/fdl="fi;or in;key 0; seg0_l 2") ..
q(/exc=login.dup login.com login.idx);
for (qx($convert_command)) {
print unless /^%CONVERT-I-DUP/ and $dups++;
}
print "$dups duplicate keys reported\n" if $dups;
-----------------------
fwiw,
Hein.
.
- Follow-Ups:
- Re: Pipe search of command procedure log file containing pipe search command. command.command.
- From: Hein RMS van den Heuvel
- Re: Pipe search of command procedure log file containing pipe search command. command.command.
- Prev by Date: Re: Current status?
- Next by Date: Re: Did Windows just cry "Uncle"?
- Previous by thread: Re: Pipe search of command procedure log file containing pipe search command. command. command.
- Next by thread: Re: Pipe search of command procedure log file containing pipe search command. command.command.
- Index(es):
Relevant Pages
|