| Macro name. REMDUPS | Edit macro REMDUPS | |
| users. | Authors of text, dcf, HTML, gml, etc. | Author: David McRitchie |
| type. |
Edit Macro resides in SYS1.TSOCLIST for use with TSO Edit Macro resides in d:\spfmacro for use with SPF/PC | |
| REMDUPS | Remove Duplicates, duplicate lines removed between pointers | |
| Related | CHECKDUP -- checks for repeated words. Used in DUADD | |
REMDUPS removes duplicate lines. There are a few options (NXDUP, FLAG, SEP) that will cause something else to happen instead of delete lines.
REMDUPS is frequently used to remove duplicate blank lines.
| ISREDIT | REMDUPS | [lptr-range] [NX | X] ...additional options below... |
| lptr-range | (Optional) It takes two line pointers to indicate a range of lines to be deleted (or processed). The line pointers must be a labels. Specifying one line pointer is invalid. Default is .ZFIRST .ZLAST |
| NX | Affects only lines that are NOT EXCLUDED from the display. |
| X | Affects only lines that are EXCLUDED from the display. |
| NOTE | Deleted lines will be displayed as NOTE lines. |
| col-pair | A pair of columns is optional. Specification of a single column is not valid. May cause a problem with variable length record files(?). |
| NXDUP |
Option will X out all lines in range, and then NX all duplicated
lines, including the original line of the duplication. This option
is incompatible with the following options: NX X FLAG(x) SEP BLANK;
although SEP may be run afterwards to produce a nice separation of
groups.
Keep only duplicate lines, remove all others
|
| BLANK | Groups of lines separated by BLANK separator -- USE with NX for best results. Lines will not be deleted. |
| SEP | Groups of lines separated by separator -- USE with NX for best results. Lines will not be deleted. |
| SHOW | lines that would otherwise be deleted will SHOW up as a NOTEline. |
| '[string]' | Turns on SEP option. Uses "<string>" supplied in front of combined string based on column-pairs. |
|
--FLAG--- options | Best results are obtained if you first EXCLUDE ALL lines first and then USE FLAG(0) |
| FLAG | Same as FLAG(80) unless all lines are excluded |
| FLAG(0) | Only changes X-status to NX-status for duplicates |
| FLAG(n) | lines that would otherwise be deleted are flagged in column |
Examples:
This macro can be used within a macro for instance
within DUADD it is invoked using
ISREDIT REMDUPS .DUADF .DUADL
REMDUPS .beg .end
REMDUPS .duadf .duadl
REMDUPS 9 35 SHOW
REMDUPS 24 29 sep NX
Internal Aspects:
[TSO code]
[SPF/PC code] Please send your comments concerning my pages or materials to: David using send email comments
Disclaimer and site usage: Material at The REXX Macros Toolbox is available without warranty of any kind. Redistribution of source, coding and documentation other than from this site is prohibited.
Copyright © 1995 - 2006, F. David McRitchie, All Rights Reserved