Article View: bit.listserv.xedit-l
Article #776Re: macro execution time
From: Richard Varenas
Date: Tue, 08 Dec 1992 18:58
Date: Tue, 08 Dec 1992 18:58
55 lines
2508 bytes
2508 bytes
Oops! Sorry, I forgot to include the SHOWDUPS xedit macro. See attached.
-Rich
----------------------------Original message----------------------------
In article <XEDIT-L%92120715220630@OHSTVMA.ACS.OHIO-STATE.EDU>, you say:
>
>Would someone please critique the xedit macro below and tell me why it
?????
Huh? Where? ?????
?????
>takes so long to execute especially when a file has > 500 records.
>I tested it on a file with > 4900 records and it took forever on a 9121.
>I actually quit before it finished.
>
>The macro (showdups) shows duplicate records in a file.
>
>Ex. SHOWDUPS 1 8 (staring & ending column)
>
>I suspect the combination of 'LPREFIX' and 'NEXT' command have something
>to do with the slowness BUT they are built-in Xedit commands right?
RIGHT!
--------- Start of macro
/* SHOWDUPS XEDIT shows duplicate records or portions of same */
parse arg start end .
'EXTRACT /SIZE/LRECL/'
If start = '' then start = 1; If end = '' then end = lrecl.1
'SORT *' start end
'TOP'
pline = ''
'NEXT 1'
'PIPE CMS Q TIME|STEM TIME.'
start_time = word(time.1,3)
Do a = 1 to size.1
'COMMAND EXTRACT /CURLINE/'
cline = substr(curline.3,start, end)
'COMMAND NEXT 1'
If rc^= 0 then leave a
'COMMAND EXTRACT /CURLINE/'
nline = substr(curline.3,start, end)
'COMMAND UP 1'
If (cline ^= nline) & (cline ^= pline) then do
'COMMAND LPREFIX X'
End
Else 'COMMAND NEXT 1'
If rc^= 0 then leave a
pline = cline
End a
'TOP'
'NEXT 1'
'SET SHADOW OFF'
'TOP'
'PIPE CMS Q TIME|STEM TIME.'
end_time = word(time.1,3)
'COMMAND EMSG' start_time '-' end_time
Exit
Technical Details
Message-ID:
<XEDIT-L%92120814010104@OHSTVMA.ACS.OHIO-STATE.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!gatech!paladin.american.edu!auvm!DUVM.BITNET!VARENASShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10c92b,99204ff00cfd5cc6 X-Google-Attributes: gid10c92b,public X-Google-ArrivalTime: 1992-12-08 11:36:18 PST Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!paladin.american.edu!auvm!DUVM.BITNET!VARENAS Resent-Organization: Drexel University Message-ID: <XEDIT-L%92120814010104@OHSTVMA.ACS.OHIO-STATE.EDU> Newsgroups: bit.listserv.xedit-l Date: Tue, 8 Dec 1992 13:58:44 EST Sender: VM System Editor List <XEDIT-L@UGA.BITNET> Comments: Resent-From: Richard Varenas <VARENAS@DUVM> Comments: Originally-From: Melvin Klassen <KLASSEN@UVVM> From: Richard Varenas <VARENAS@DUVM.BITNET> Subject: Re: macro execution time Lines: 55