Need the command to view lines containing a specific word



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

Need the command to view lines containing a specific word

Postby jaga123 » Wed Oct 15, 2008 10:54 am

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.
jaga123
 
Posts: 9
Joined: Thu Aug 21, 2008 2:52 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby MrSpock » Wed Oct 15, 2008 6:23 pm

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
User avatar
MrSpock
Global moderator
 
Posts: 807
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

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

Postby jaga123 » Thu Oct 16, 2008 11:34 am

Great! It work good :D

Thanks Spock
jaga123
 
Posts: 9
Joined: Thu Aug 21, 2008 2:52 pm
Has thanked: 0 time
Been thanked: 0 time


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post