RE: Pipe search of command procedure log file containing pipe search command. command.command.



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.
.



Relevant Pages

  • INSERT INTO Not working correctly
    ... I have a command button that does a "Copy" but more of a INSERT INTO command ... Dim strSql As String 'SQL statement. ... 'Make sure there is a record to duplicate. ... !PhaseComplDateReqPlan = Me.PhaseComplDateReqPlan ...
    (microsoft.public.access.formscoding)
  • Re: Cannot Browse the Domain in the Network Neighborhood
    ... Explanation of command ... > duplicate SPN's listed where the event log's say they should be. ... > one of the alleged duplicate SPN's is the name of my domain controller. ... >> With respect to the KDC errors are you referring to KDC event id 11's? ...
    (microsoft.public.windows.server.sbs)
  • Re: problem with short date
    ... You say you want to add a "Duplicate record" command but you get an error ... Doug Steele, Microsoft Access MVP ...
    (microsoft.public.access.forms)
  • Re: How to eliminate duplicate entries
    ... I think you'll find that deleting a bunch of rows in an autofilter goes much ... Then I sort by that duplicate indicator column and delete the duplicates. ... > were well over a thousand dups that showed up, some with 3 or more dups. ... > What i would like to know is: how do you leave the first occurence of the ...
    (microsoft.public.excel.misc)
  • Re: controlling cmd.exe via named pipes
    ... I use them to avoid handling named pipes directly by Windows ... 1-I create two different named pipes, say 'cmdIN' and 'cmdOUT'; ... That's the command switch that tells Cmd to run the command on the command line, and then wait for more commands. ... You can duplicate them into Cmd's process because that process doesn't exist yet. ...
    (comp.lang.pascal.delphi.misc)