HP3000-L Archives

January 2000, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Emerson, Tom # El Monte" <[log in to unmask]>
Reply To:
Emerson, Tom # El Monte
Date:
Mon, 3 Jan 2000 18:37:33 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (59 lines)
Here is one way of doing it [kind of "brute-force-ish", but it seems to
work...]

/c"occurs"begin\~occurs~\end"@
/divide "\~"
/divide "~\"
/c"\~""@
/c"~\""@
/l all

This "almost" works to your specifications -- it changes a line such as:

   "this occurs 10 times"

into

   "this begin
    occurs
    end 10 times"

which I take it isn't quite what you're looking for [but it may help you get
along the right track]  For the way you were trying to do it, it sounds like
you really need to use "find" instead of "list" [unlike Edit/3000, "list"
lists all occurances; hence you only change the last line; "find", OTOH,
finds the next occurance.  I believe the "while" and/or "while flag"
commands are available in Qedit just as they are in Edit/3000, but it has
been SOOO long since I've used this, I'm unsure.... :) ]

> -----Original Message-----
> From: Steve Hammond [mailto:[log in to unmask]]
> Sent: Monday, January 03, 2000 3:19 PM
> To: [log in to unmask]
> Subject: Qedit Question
>
>
> Since the Robelle people are taking a well-deserved day off,
> I need help with QEDIT.
>
> Here's what I want to do:
> - I have file SCHEMA
> - every time a find the word "OCCURS" in the file, I want to:
>     - add a line before it that says "BEGIN"
>     - add a line after it that says "END"
>
> I tried a USE file that had
>      t SCHEMA
>      l "OCCURS"
>      a *-1 = B (a file that contains a single line that says "BEGIN")
>      a *+1 = E (a file that contains a single line that says "END")
>
> this USE file just added the lines to the last occurance of "OCCURS"
>
> I know I'm close, but I can't figure out how to do the
> repetitive function
>
> thx
> steve hammond
>

ATOM RSS1 RSS2