View previous topic :: View next topic
|
Author |
Message |
maridawson
New User
Joined: 24 Jun 2008 Posts: 59 Location: chennai
|
|
|
|
How to display only lines containing a particular word using TSO/ISPF option? |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
if I understood your request correctly and assuming you are in edit mode,
Code: |
X ALL
F WORD ALL
DELETE X ALL
|
Gerry |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
One more thought-
Code: |
F ALL 'PARTICULAR WORD' |
& yup as Gerry said either in Edit (or view) mode. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Stole an edit macro years ago from IBM: I call it INCL (include)
Code: |
/* REXX */
ADDRESS ISREDIT
'MACRO (TARGET)'
X ALL
FIND ALL TARGET
EXIT
|
|
|
Back to top |
|
|
maridawson
New User
Joined: 24 Jun 2008 Posts: 59 Location: chennai
|
|
|
|
In the below PS file, all 'infy' in the lines with string 'ABC' are changed to 'bofa'.
Initial:
000001 ABC000infy
000002 ABC222infy
000003 AAA000infy
000004 CCC000infy
000005 ABC333infy
After command:
000001 ABC000bofa
000002 ABC222bofa
000003 AAA000infy
000004 CCC000infy
000005 ABC333bofa
Tell me the single line command to change above data to look like below one? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Code: |
X ALL;F 1 3 'ABC' ALL;C 'infy' 'bofa' NX ALL |
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
Tell me the single line command to ... |
It is worth noting that not all complex changes can be done with a single line command. Some changes may take a few commands. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Also, keep in mind that when you show only a tiny bit of input/output data and do not describe the "rules", code that works for the sample data may not work for other cases.
Stringing multiple commands on one command line is still multiple commands. . . . |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Mari,
Question :
Quote: |
How to display only lines containing a particular word using TSO/ISPF option? |
Input Data :
Code: |
000001 ABC000infy
000002 ABC222infy
000003 AAA000infy
000004 CCC000infy
000005 ABC333infy |
Answer : show 8 10 'abc'
Syntax : show columnstart columnend textstringwithinquotes
Question :
Quote: |
In the below PS file, all 'infy' in the lines with string 'ABC' are changed to 'bofa'.
Tell me the single line command to change above data to look like below one? |
Answer :
Thank You Robert sample u have done most of the work.
Command for your input for the result output.<br>
X ALL;F 8 10 'ABC' ALL;C 'infy' 'bofa' NX ALL
Above command is not a single line command. It is multiple, and can be entered in a single line. ';' |
|
Back to top |
|
|
senjay
Active User
Joined: 10 May 2007 Posts: 147 Location: India
|
|
|
|
Quote: |
Tell me the single line command to change ... |
If you want to do the changes in a single line command, you can also try the below.
C ALL P'ABC===INFY' P'ABC===BOFA' |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
|