Data Manipulation Commands
Data Manipulation Commands
ISPF provides powerful line commands that allow users to edit and manipulate data in datasets. These commands are executed by entering them in columns 1 to 6 (Command Area) and pressing Enter. Below is a simplified overview of the most commonly used commands, categorized for ease of understanding.
Basic Commands -
INSERT (I):
- Insert blank lines into the dataset.
- Single Line: Enter
I
in columns 1 to 6.
- Multiple Lines: Specify the number of lines after
I
(e.g.,I11
for 11 lines).
DELETE (D):
- Remove lines from the dataset.
- Single Line: Enter
D
.
- Multiple Lines: Add a number after
D
(e.g.,D6
to delete 6 lines).
- Block of Lines: Use
DD
at the start and end of the block.
REPEAT (R):
- Duplicate lines.
- Single Line: Enter
R
to duplicate once. - Multiple Copies: Add a number after
R
(e.g.,R6
to repeat a line 6 times). - Block of Lines: Use
RR
at the start and end of the block to repeat it once.
Note! REPEAT and DELETE works in a similar way.
Copy/Move Commands -
Note! COPY or MOVE should always code in a combination with PASTE or OVERLAY.
COPY (C):
- Copy lines without removing the original.
- Single Line: Enter
C
. - Block of Lines: Use
CC
at the start and end of the block.
MOVE (M):
- Move lines, removing the original content.
- Single Line: Enter
M
. - Block of Lines: Use
MM
at the start and end of the block.
PASTE (A/B):
- Paste copied or moved content.
- A: Paste after the specified line.
- B: Paste before the specified line.
OVERLAY (O/OO):
- Overlay copied or moved content onto existing lines.
- O: Overlay a single line.
- OO: Overlay multiple lines.
- If the overlay is incomplete, the line will be copied instead, and an error message will be displayed.
Exclude/Show Commands -
Exclude Lines (X):
- Temporarily hide lines without deleting them.
- Single Line: Enter
X
.
- Block of Lines: Use
XX
at the start and end of the block.
Show Lines:
- Display excluded lines.
- F: Show the first line of an excluded block.
- L: Show the last line of an excluded block.
- L3: Show the last 3 lines of an excluded block.
Text Handling Commands -
- TS: Split a text line at the cursor to insert content.
- TF: Flow text to the end of a paragraph.
- TE: Format the screen for typing paragraphs.
- LC: Change text from uppercase to lowercase.
- UC: Change text from lowercase to uppercase.
Miscellaneous Commands -
- BNDS: Adjust the current bounds for editing.
- COLS: Display formatted column numbers.
- MASK: Edit the current mask for line editing.
- TABS: Adjust tab settings.
Data Commands -
MD (Make Dateline):
- Convert temporary lines (e.g., from NOTE or MASK) into permanent data lines that will be saved.
Assigning Commands to PF Keys -
- You can assign line commands to PF keys for quick access.
- Example: Assign
I5
(Insert 5 lines) to PF7:- Type
KEYS
on the command line to open the key list. - Assign
:I5
to PF7. - Save the key list.
- Type