Page 1 of 1

Need the command to view lines containing a specific word

PostPosted: Wed Oct 15, 2008 10:54 am
by jaga123
Hi,

I have a dataset which contains 1000 of lines and I want to view only those lines containing the word
"SWIFT". At present i used to do so by typing "F SWIFT" in the command line and then going through all the lines one by one which is really tough. So i am looking for a better option.

1) So is there any command to copy only those lines containing the word "SWIFT" to a new dataset.

2) Instead of copying to a new dataset, is it possible to view only those lines containing the word "SWIFT".

Please assist me.

Re: Need the command to view lines containing a specific word

PostPosted: Wed Oct 15, 2008 6:23 pm
by MrSpock
I would, using the ISPF/PDF EDIT program:

Exclude all lines containing the word SWIFT: X SWIFT WORD ALL
Remove all non-excluded lines: DEL NX ALL
Restore the originally deleted lines: FLIP

To copy the lines that only contain the word SWIFT, after performing the above steps, use the REPLACE command to create a new dataset or member: REPLACE .zf .zl

Re: Need the command to view lines containing a specific word

PostPosted: Thu Oct 16, 2008 11:34 am
by jaga123
Great! It work good :D

Thanks Spock