IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ISPF EDIT Macros - Primary Commands


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pbgunasekar

New User


Joined: 28 May 2005
Posts: 26
Location: Chennai

PostPosted: Tue Mar 07, 2006 3:23 pm
Reply with quote

ISPF EDIT - Primary Commands

Code:
F 'text'  Find text string 
F 'text' nn  Find text in column nn 
C 'text1' 'text2'  Changes next occurrence of text string 
C 'text1' 'text2' all  Changes all occurrences of text string 
C 'text1' 'text2' all nn  Changes all occurrences of text string in column nn 
C 'text1' 'text2' all X  Changes all occurrences of text string in excluded lines 
C 'text1' 'text2' all NX  Changes all occurrences of text string in Non excluded lines 
C 'text1' 'text2' first  Changes first occurrences of text string 
C 'text1' 'text2' prev  Changes previous occurrences of text string 
C 'text1' 'text2' last  Changes last occurrences of text string 
X 'text1' all  Excludes (hides) all lines with text string 
X 'text1' all nn  Excludes (hides) all lines with text string in column nn 


Quote:
FLIP Displays previously excluded lines, hides previously displayed lines
RES / RESET Reset. Displays all excluded lines. Erases all indicative messages.
RECOVERY ON Sets up edit dataset so that changes can be undone
UNDO Reverses last edit command
CAN / CANCEL Exits from dataset without saving any changes
SAVE Saves dataset and all changes
END Exits from dataset
HEX ON Displays hex characters in readable format
HEX OFF Reverts hex characters to stored format
SORT n y Sort dataset based on contents of columns n through y
DELETES 'text' nn Deletes all lines with text string in column nn
CUT name Places marked lines in clipboard
PASTE name Pastes contents of clipboard to dataset (deletes lines from clipboard)
PASTE name KEEP Pastes contents of clipboard to dataset (saves lines in clipboard)
: Prefix to execute line command as a primary command on specified line
; Stacking command delimiter (default)

TE [n] - Text Entry - Gets rid of the left hand ' ' ' ' ' and line number columns giving a straight text entry screen. The argument limits the range to the next N lines.
TF [n] - Text Flow - ie reformat the text to fill lines etc. The argument limits the range to the next N lines.
X [n] - EXCLUDE - Hides next N lines (or using XX hides the defined block.)
RESET - Restores hidden lines
SEARCH - like find but the following have special meaning:
SEARCH <string> PRE - find where word begins with <string>
SEARCH <string> SUF - find where word ends with <string>
SEARCH <string> WORD - find where <string> is a word
COLS - display a ruler like display - useful when using SORT.


Text Pictures

Code:
C p'=' 'text' n  Change any character in column n to specified text 
C p'@' 'text' n  Change any alphabetic character in column n to specified text 
C p'#' 'text' n  Change any numeric character in column n to specified text 
C p'$' 'text' n  Change any special character in column n to specified text 
C p'^' 'text' n  Change any non-blank character in column n to specified text 
C p'.' 'text' n  Change any invalid character in column n to specified text 
C p'-' 'text' n  Change any non-numeric character in column n to specified text 
C p'<' 'text' n  Change any lower-case character in column n to specified text 
C p'>' 'text' n  Change any upper-case character in column n to specified text 
C x'nn' 'nn' n  Change hex numbers nn to literal number nn 


FUNCTION KEYS
Code:
F1  Help 
F2  Split screen 
F3  Exit (saves edited dataset) 
F5  Repeat last find command 
F6  Repeat last change command 
F7  Page up (page back) 
F8  Page down (page forward) 
F9  Toggle to split screen 
F10  Page right 
F11  Page left 
F12  Retrieve



ISPF EDIT
Line Commands

Code:
I  Insert a new line 
In  Insert n number of new lines 
R  Repeat this line 
RR  Repeat block of lines 
Rn  Repeat next n lines 
D  Delete this line 
DD  Delete a block of lines 
Dn  Delete the next n lines 
COL  Display column ruler 
MD  Changes message line to data line 
TS  Test split 
TFnn  Text flow to column nn
UC   Changes the text on the line from lower case to upper case
UCn   Changes the text on the ‘n’ lines starting at this one to upper case
LC   Changes the text of the line from upper case to lower case
LCn   Changes the text on the ‘n’ lines starting at this one to lower case
C   Copies the content of the line
Cn   Copies the content of the line ‘n’ times
CC   Copies the block of lines starting with the first CC command and ending with the second CC command
M   Moves the content of the line
Mn   Moves the content of n lines starting at this one
MM   Moves the block of lines starting with the first MM command and ending with the second MM command
A   Places the copied/moved lines after this line
An   Repeats the copied/moved lines n times after this line
B    Places the copied/moved lines before this line
Bn   Repeats the copied/moved lines n times before this line
X   Excludes this line
Xn    Excludes n lines starting at this line
XX   Excludes the block of lines starting with the first XX command and ending with the second XX command
O   Overlays line content with copied/moved line
On   Overlays ‘n’ lines starting at this one with copied/moved lines
OO   Overlays the block of lines starting with the first OO command and ending with the second OO command with copied/moved lines
S   Shows one line of the excluded text
Sn   Shows n lines of the excluded text
F   Shows the first line of the excluded text
Fn   Shows the first n lines of the excluded text
L   Shows the last line of the excluded text
Ln   Shows the last n lines of the excluded text
(   Shifts the line left 2 columns
(n   Shifts the line left n columns
((    Shifts the block of lines starting with the first (( command and ending with the second (( command 2 columns to the left
((n   Shifts the block of lines starting with the first (( command and ending with the second (( command ‘n’ columns to the left
)   Shifts the line right 2 columns
)n    Shifts the line right ‘n’ columns
))   Shifts the block of lines starting with the first )) command and ending with the second )) command 2 columns to the right
))n   Shifts the block of lines starting with the first )) command and ending with the second )) command ‘n’ columns to the right
<   Data shifts the line left 2 columns
<n   Data shifts the line left n columns
<<    Data shifts the block of lines starting with the first << command and ending with the second << command 2 columns to the left
<<n   Data shifts the block of lines starting with the first << command and ending with the second << command ‘n’ columns to the left
>   Data shifts the line right 2 columns
>n    Data shifts the line right ‘n’ columns
>>   Data shifts the block of lines starting with the first >> command and ending with the second >> command 2 columns to the right
>>n   Data shifts the block of lines starting with the first >> command and ending with the second >> command ‘n’ columns to the right[/quote]





1. How do I see only those lines that contain a particular string?
A. Type 'X all' then 'F all 'search-string'. Also, command ?Del all x? can be used to delete all the un-displayed lines.

2. Now I want to see only those lines that contain a particular value in the display I get after doing an 'X all, F all'.
A. Type ' F new_value all nx'. 'nx' will restrict the search only to the displayed lines.

3. How do I go to a particular line numbers?
A. Use 'L search-string' command. This is the Label command.

4. I want to find for a search-string that is Not prefix/suffix of another word. I want to find for an instance of a search-string that is whole word by itself. How can I do this?
A. Use keyword 'word' at the end of find command. E.g., 'f job word' will find for the whole word 'job'.

5. How do I specify the direction of search i.e., how do I search for a string in backward / forward direction (w.r.t. your current cursor position)?
A.
Direction Keyword Example
Backward PREV F 'job' PREV finds for string 'job' in backward direction
Forward No need to mention any keyword. It's default direction.
F 'job' finds for string 'job' in forward direction.
From the beginning of the file: F 'job' FIRST finds the first instance of sting 'job' in the file.
Count of all instances in file ALL F 'job' FIRST finds the first instance of sting 'job' in the file and gives total-no-of-instances of sting 'job' in the file.

6. How do I search for a value say '0980312' stored in comp-3 format?
A. Type F X'0980312'.

7. How do I do case sensitive search find for a given search-string?
A. Just, enclose the search-string within quotes and have a letter C in front of the string itself. For e.g., F C'FindMe' will find all FindMe strings only if the case matches.

8. How do I find for any non-blank characters?
A. Use picture string '^'. E.g., "F P'^' 36" will find the next non-blank characters in column 36.

9. How do I find for any numeric character?

A. Use picture string '#'. E.g., 1. "F p'#'" finds the next numeric character and "F 'PAGE ##' will find the next instance of the string 'page followed by a blank followed by 2 numeric characters'.

10. How do I find for any non-numeric character?
A. Use picture string '-'.

11. How do I find for any alphabetic character?
A. Use picture string '@'.

12. How do I find for any uppercase alphabetic character?
A. Use picture string '>'.

13. How do I find for any lowercase alphabetic character?

A. Use picture string '<'.

14. How do I find for any non-display character?
A. Use picture string '.' E.g., "f p'.'" finds the next instance of non-display character.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Mar 16, 2006 7:02 pm
Reply with quote

You left out the MODEL primary command.

MODEL is a group of source statements and optional notes that provide
sample data for creating and editing dialogs.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Aug 23, 2016 9:39 pm
Reply with quote

Quote:
3. How do I go to a particular line numbers?
A. Use 'L search-string' command. This is the Label command.

Actually, it is the LOCATE command.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Wed Aug 24, 2016 1:20 am
Reply with quote

Quote:
1. How do I see only those lines that contain a particular string?
A. Type 'X all' then 'F all 'search-string'. Also, command ?Del all x? can be used to delete all the un-displayed lines.

Also, see ONLY primary command.
HIDE will hide the excluded lines. RESET will UNHIDE but it will also undo your x all;f all.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Wed Aug 24, 2016 1:42 am
Reply with quote

Quote:
5. How do I specify the direction of search i.e., how do I search for a string in backward / forward direction (w.r.t. your current cursor position)?

FIND LAST followed by repeated F5s will do finds starting at the bottom.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Wed Aug 24, 2016 1:57 am
Reply with quote

Terry Heinze wrote:
Quote:
5. How do I specify the direction of search i.e., how do I search for a string in backward / forward direction (w.r.t. your current cursor position)?

FIND LAST followed by repeated F5s will do finds starting at the bottom.
FIND PREV / FIND NEXT from the current position in the data set or member
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Mon Sep 11, 2017 7:23 pm
Reply with quote

ISPF EDIT
Extra Line Commands - Modifier K (Keep)


Code:

Quote:

A Places the copied/moved lines after this line
An Repeats the copied/moved lines n times after this line
AK Places the copied/moved lines after this line, and keeps the copied/moved lines
AKn Repeats the copied/moved lines n times after this line, and keeps the copied/moved lines

B Places the copied/moved lines before this line
Bn Repeats the copied/moved lines n times before this line
BK Places the copied/moved lines before this line, and keeps the copied/moved lines
Bkn Repeats the copied/moved lines n times before this line, and keeps the copied/moved lines

O Overlays line content with copied/moved line
On Overlays ‘n’ lines starting at this one with copied/moved lines
OO Overlays the block of lines starting with the first OO command and ending with the second OO command with copied/moved lines
OK Overlays line content with copied/moved line, and keeps the copied/moved lines
OKn Overlays ‘n’ lines starting at this one with copied/moved lines, and keeps the copied/moved lines
OOK Overlays the block of lines starting with the first OO command and ending with the second OO command with copied/moved lines, and keeps the copied/moved lines

The lines to be copied are marked as follows

C Copies the content of the line
Cn Copies the content of the line ‘n’ times
CC Copies the block of lines starting with the first CC command and ending with the second CC command

M Moves the content of the line
Mn Moves the content of n lines starting at this one
MM Moves the block of lines starting with the first MM command and ending with the second MM command
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
Search our Forums:

Back to Top