Re: [CMS-PIPELINES] differences between the first and last matching lines

2020-05-16 Thread Amphitryon
Am 15.05.2020 um 18:59 schrieb Glenn Knickerbocker:
> On 5/9/2020 5:48 PM, amphitr...@ok.de wrote:
>> If the easily filtered headers are as good as section delimiters,
>> you have won.
> 
> That's where I lose in this case.  Even the actual section headers
> identifying the different source files are unreliable.
> 
> ¬R
> 
So I assume the headers may be easily filtered by human but to
program it would take 15 or more ifs and buts. And 'highly likely'
is not sufficient in your case? A comparable process like an
auto-focus camera finds highest contrast, find best match.

Ciao.Mike
--
www.Ok.de - die kostenlose E-Mail Adresse


Re: [CMS-PIPELINES] differences between the first and last matching lines

2020-05-15 Thread Paul Gilmartin
On 2020-05-15, at 10:59:02, Glenn Knickerbocker wrote:
>
> On 5/9/2020 5:48 PM, amphitr...@ok.de wrote:
>> If the easily filtered headers are as good as section delimiters,
>> you have won.
>
> That's where I lose in this case.  Even the actual section headers
> identifying the different source files are unreliable.
>
Retain a prior version of each source file (or use
backups) and use SUPERC, diff, or cmp to compare
pairwise.

-- gil


Re: [CMS-PIPELINES] differences between the first and last matching lines

2020-05-15 Thread Glenn Knickerbocker
On 5/9/2020 5:48 PM, amphitr...@ok.de wrote:
> If the easily filtered headers are as good as section delimiters,
> you have won.

That's where I lose in this case.  Even the actual section headers
identifying the different source files are unreliable.

¬R


Re: [CMS-PIPELINES] differences between the first and last matching lines

2020-05-09 Thread Paul Gilmartin
On 2020-05-09, at 15:48:18, amphitr...@ok.de wrote:
>
> Am 08.05.2020 um 20:46 schrieb Glenn Knickerbocker:
>> (I don't control
>> the process of building the big file, so I can't just add section
>> delimiters, but I can easily filter out commonly occurring lines like
>> blanks and headers.)
>
> ... In case your files differ in size you
> have to find anchors to re-sync them between the headers/sections.
>
Ouch!  Is there any way you can use a smarter comparator such as
SUPERC or diff (should be in OpenExtensions)?

> Just in case you'd like to have look what I did, it is in there:
> http://forum.hp41.org/download/file.php?id=105

-- gil


Re: [CMS-PIPELINES] differences between the first and last matching lines

2020-05-09 Thread Amphitryon
Am 10.05.2020 um 00:17 schrieb Paul Gilmartin:
> Ouch!  Is there any way you can use a smarter comparator such as
> SUPERC or diff (should be in OpenExtensions)?

LOL! No, SUPERC is super, no doubt. But why not reinvent the wheel
once more? SUPERC it is not a pipe stage (AFAIK) and the task was
"show the differences". I only wanted to show how I emphasize them
in one single and quite special case.

Ciao.Mike
--
www.Ok.de - die kostenlose E-Mail Adresse


Re: [CMS-PIPELINES] differences between the first and last matching lines

2020-05-09 Thread Paul Gilmartin
On 2020-05-09, at 11:33:29, Glenn Knickerbocker wrote:
>
> On Fri, 8 May 2020 13:00:40 -0600, gil wrote:
>> On 2020-05-08, at 12:46:56, Glenn Knickerbocker wrote:
>>> Anybody have an existing idiom for picking out the section of a file
>>> between the first and last matches with another file?
>> How would you use the output of comparing?
>
> Currently I use SET SELECT in XEDIT to display new and changed lines in
> the small file, and issue a MSG with a list of new words in the small
> file.  I want to add a MSG listing words removed from the small file.
> That's why I need to find the start and end of it in the big file.
>
Could you use XEDIT in UPDATE mode to get a complete report of
new, changed, and removed lines?

Or SUPERC on before and after versions of the small file?

If not SUPERC, copy both instances to BFS and use diff?

-- gil


Re: [CMS-PIPELINES] differences between the first and last matching lines

2020-05-09 Thread Amphitryon
Hello!

Am 08.05.2020 um 20:46 schrieb Glenn Knickerbocker:
>  (I don't control
> the process of building the big file, so I can't just add section
> delimiters, but I can easily filter out commonly occurring lines like
> blanks and headers.)

If the easily filtered headers are as good as section delimiters,
you have won. Then you may define data streams i) last file and
ii) second to last or first or what you prefer as reference. With
this two input streams you may do something like

>  '|i:combine x',  /* spot the difference  */
>  '| xlate *-* 01-ff 2 00 0',  /* colorize delta   */
>  '| insert /vsc writ cms 0 24 0 (color /',/* combine CMDs */
>  '| insert /;PSC REF/ after', /* show it immediately  */
>  '| split ;', /* one CMD one line */
>  '| cms', /* execute the CMDs */

This is an excerpt of a "Delta Sniffer" which shows on the screen
two TCP/IP data streams and hi-lites what changed. This works as
both streams are in sync. In case your files differ in size you
have to find anchors to re-sync them between the headers/sections.

Just in case you'd like to have look what I did, it is in there:
http://forum.hp41.org/download/file.php?id=105

Ciao.Mike
--
www.Ok.de - die kostenlose E-Mail Adresse


Re: [CMS-PIPELINES] differences between the first and last matching lines

2020-05-09 Thread Glenn Knickerbocker
On Fri, 8 May 2020 13:00:40 -0600, gil wrote:
>On 2020-05-08, at 12:46:56, Glenn Knickerbocker wrote:
>> Anybody have an existing idiom for picking out the section of a file
>> between the first and last matches with another file?
>How would you use the output of comparing?

Currently I use SET SELECT in XEDIT to display new and changed lines in
the small file, and issue a MSG with a list of new words in the small
file.  I want to add a MSG listing words removed from the small file.
That's why I need to find the start and end of it in the big file.

¬R


Re: [CMS-PIPELINES] differences between the first and last matching lines

2020-05-09 Thread Alain Benvéniste
Hlasm toolkit is chargeable isn’t it ?

> Le 9 mai 2020 à 03:06, Donald Russell  a écrit :
> 
> SUPERC?
> 
> 
>> On Fri, May 8, 2020 at 11:47 AM Glenn Knickerbocker 
>> wrote:
>> 
>> I have one file that includes copies of several others.  When one of the
>> component files is updated, I want to compare and show the differences.
>> Anybody have an existing idiom for picking out the section of a file
>> between the first and last matches with another file?  (I don't control
>> the process of building the big file, so I can't just add section
>> delimiters, but I can easily filter out commonly occurring lines like
>> blanks and headers.)
>> 
>> ¬R
>> 


Re: [CMS-PIPELINES] differences between the first and last matching lines

2020-05-09 Thread Kris Buelens
There also is the COMPAIR XEDIT macro to interactively compare 2 files side
by side.

Op za 9 mei 2020 03:07 schreef Donald Russell :

> SUPERC?
>
>
> On Fri, May 8, 2020 at 11:47 AM Glenn Knickerbocker 
> wrote:
>
> > I have one file that includes copies of several others.  When one of the
> > component files is updated, I want to compare and show the differences.
> > Anybody have an existing idiom for picking out the section of a file
> > between the first and last matches with another file?  (I don't control
> > the process of building the big file, so I can't just add section
> > delimiters, but I can easily filter out commonly occurring lines like
> > blanks and headers.)
> >
> > ¬R
> >
>


Re: [CMS-PIPELINES] differences between the first and last matching lines

2020-05-08 Thread Paul Gilmartin
On 2020-05-08, at 19:04:33, Donald Russell wrote:
> 
> SUPERC?
>  
Topical to this list, is there a way to connect output(s) of
Pipelines to the new_file_ID and/or old_file_ID inputs of
ASMFSUPC?  (writing to temporary file(s) is non-Pipethink.)

https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.asmk200/supci3a.htm

I know how I'd do it on z/OS using POSIX pipes and Rexx.

> On Fri, May 8, 2020 at 11:47 AM Glenn Knickerbocker wrote:
> 
>> I have one file that includes copies of several others.  When one of the
>> component files is updated, I want to compare and show the differences.
>> Anybody have an existing idiom for picking out the section of a file
>> between the first and last matches with another file?  (I don't control
>> the process of building the big file, so I can't just add section
>> delimiters, but I can easily filter out commonly occurring lines like
>> blanks and headers.)

-- gil


Re: [CMS-PIPELINES] differences between the first and last matching lines

2020-05-08 Thread Donald Russell
SUPERC?


On Fri, May 8, 2020 at 11:47 AM Glenn Knickerbocker 
wrote:

> I have one file that includes copies of several others.  When one of the
> component files is updated, I want to compare and show the differences.
> Anybody have an existing idiom for picking out the section of a file
> between the first and last matches with another file?  (I don't control
> the process of building the big file, so I can't just add section
> delimiters, but I can easily filter out commonly occurring lines like
> blanks and headers.)
>
> ¬R
>


Re: [CMS-PIPELINES] differences between the first and last matching lines

2020-05-08 Thread Paul Gilmartin
On 2020-05-08, at 12:46:56, Glenn Knickerbocker wrote:
>
> I have one file that includes copies of several others.  When one of the
> component files is updated, I want to compare and show the differences.
> Anybody have an existing idiom for picking out the section of a file
> between the first and last matches with another file?  (I don't control
> the process of building the big file, so I can't just add section
> delimiters, but I can easily filter out commonly occurring lines like
> blanks and headers.)
>
If you have access to the component files, can't you replicate a copy
of the big file from them and compare?

How would you deal with false matches?

Can you preserve copies of the component files and compare piecewise?

How would you use the output of comparing?

-- gil


Re: [CMS-PIPELINES] differences between the first and last matching lines

2020-05-08 Thread Alain Benvéniste
Glenn 
Does your need is more complex than just using the cms compare cmd ?

> Le 8 mai 2020 à 20:47, Glenn Knickerbocker  a écrit :
> 
> I have one file that includes copies of several others.  When one of the
> component files is updated, I want to compare and show the differences.
> Anybody have an existing idiom for picking out the section of a file
> between the first and last matches with another file?  (I don't control
> the process of building the big file, so I can't just add section
> delimiters, but I can easily filter out commonly occurring lines like
> blanks and headers.)
> 
> ¬R