View previous topic :: View next topic
|
Author |
Message |
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
Hi,
My requirement is to select all the lines in a member with a particular string andl delete all the lines with single command.
Could anyone let me know the command. I remember there is a command for that. But couldn't recollect.
~Vamsi |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Well, if it were me, and if I was editing the member in an ISPF EDIT session, I would first exclude all of the records containg the string:
X 'STRING' ALL
then I would delete all of the excluded records:
DEL X ALL
then I would save the edited data:
SAVE |
|
Back to top |
|
|
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
superk,
What is the basic difference between DEL all X and DEL all NX
~Vamsi |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
One is DELETE ALL EXCLUDED.
The other is DELETE ALL NON-EXCLUDED.
They are inverse operations of each other. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Adding to what K suggested, you might want to enter "flip" (no quotes) on the cmd line after issuing the "X 'STRING' ALL".
This will allow you to see what you're deleting before you do. Many times you get more (or less) than you bargained for. You can also get the same result with:
x all;f all 'string'
If you're satisfied, then enter del all nx. |
|
Back to top |
|
|
|