Delete command...
Chad McWilliams
chad at computiprint.com
Wed Jul 7 06:23:29 PDT 2004
Thanks for the info, Nancy. I did understand about how the delete
works, as far as how it waits until an end. But no matter what I did,
if I issued a delete within the @wlf processing, it would not delete the
record, even after an end or an escape. The record always remained.
The only way I got it to work was by setting a flag and then, after an
escape, delete the record if the flag was set. I was just wondering if
I was missing something, or this was the normal way to handle this type
of situation. I couldn't find anything in the docs that talked about
this.
Thanks for all the responses, and suggestions!
-Chad McWilliams
-----Original Message-----
From: Nancy Palmquist [mailto:nlp at vss3.com]
Sent: Tuesday, July 06, 2004 3:50 PM
To: Chad McWilliams
Cc: filepro-list at seaslug.org
Subject: Re: Delete command...
Chad McWilliams wrote:
>
> Sorry for the dumb question, but are you able to use the delete
> command in @wlf processing? When I try the following:
>
> @wlfm If: m eq "d"
> Then: delete; end
>
> the record remains, even though the line executes.
>
> If I instead do an escape and then issue the delete in the processing
> that gets called with the escape, the delete works correctly.
>
> Am I missing something?
>
> -Chad McWilliams
I just finished reading the responses so far and I think they fell short
of making it clear what is happening.
DELETE is a peculiar as far as commands go. It is not executed at the
time it is issued. It is held in reserve and when you finally do an END
or ESCAPE or whatever makes the end of the record processing happen and
you are about to go to the next record, then the DELETE is done.
So you could put DELETE on line 1, continue to process for 400 lines and
when it got to the END of your logic, then the record is DELETED, not
before.
Does that help?
Nancy
--
Nancy Palmquist
Virtual Software Systems
PHONE: (412) 835-9417 Web site: http://www.vss3.com
More information about the Filepro-list
mailing list