Primary Commands in Edit or Browse or View modes


Primary Commands are commands that can be entered on the command line while working with a dataset or member of a Partitioned Dataset (PDS). These commands allow you to perform various operations, such as searching, editing, sorting, or managing data.

General Rules -

  • Separators: Use either a blank or a comma to separate command operands.
  • Command Input Field:
    • Trailing nulls exist, so you can insert/expand operands but cannot use cursor keys to add spaces between operands.
  • Error Handling: If there’s an error in the command, a message is displayed, and the command remains in the command field.
  • Ampersand Usage (&): Precede a command with & to keep it in the command field after execution.
Note! All the below commands are applicable when the dataset is opened in Edit or Browse or View modes

Primary Commands -

CommandDescriptionUsage/Example
BOUNDSSet left and right margins for editing.BOUNDS 1 72 sets boundaries to columns 1-72.
CANCELCancel editing without saving changes.CANCEL exits without saving.
CAPSSet CAPS mode ON or OFF.CAPS ON saves data in uppercase.
CHANGEFind and replace a string.CHANGE ABC XYZ ALL replaces ABC with XYZ.
COPYCopy data from another member or dataset.COPY MEMBER1 copies contents of MEMBER1.
CREATECreate a new member in a PDS.CREATE NEWMEM creates a member NEWMEM.
CUTCopy or move data to a clipboard.CUT saves the selected lines.
DISPLAYShow invalid characters in Browse mode.DISPLAY makes non-printable characters visible.
DELETEDelete lines in edit mode.DELETE ALL removes all excluded lines.
EDITOpen another member for editing recursively.EDIT MEMBER2 opens MEMBER2 for editing.
ENDExit the edit session. Saves changes based on the AutoSave setting.END ends the session.
EXCLUDEHide lines containing a specific string.EXCLUDE ABC hides lines with ABC.
FINDLocate a specific character string.FIND XYZ locates XYZ in the dataset.
HEXEnable HEX mode to view hex values.HEX ON turns on hex display.
HILITEEnable enhanced color settings for code.HILITE COBOL highlights COBOL syntax.
MODELInsert predefined templates or models.MODEL JCL copies a predefined JCL template.
MOVEMove data to another member or dataset.MOVE MEMBER3 moves contents to MEMBER3.
NULLSTurn NULLS mode on or off.NULLS ON enables null fields.
NUMBEREnable line numbering.NUMBER adds sequence numbers.
PASTEPaste data copied with the CUT command.PASTE pastes the clipboard content.
RENUMRenumber lines in NUMBER mode.RENUM renumbers all lines sequentially.
REPLACEReplace a member or dataset.REPLACE MEMBER4 replaces MEMBER4 content.
SAVESave changes without exiting the editor.SAVE writes changes to the dataset.
SORTSort data based on columns or sequence.SORT 1 10 A sorts columns 1-10 in ascending order.
TABSEnable/disable TABS mode and set logical tabs.TABS ON turns on tabs.
UNDOUndo the last change or command.UNDO reverts the last action.
UNNUMRemove line numbering.UNNUM clears sequence numbers.

Examples -

In the EDIT screen, standard scrolling commands like UP, DOWN, LEFT, and RIGHT are valid. For example:

  • DOWN 5: Moves the display down by 5 lines.
    Down Command Panel Down Command Panel
  • UP 10: Moves the display up by 10 lines.
    Up Command Panel Up Command Panel
  • CREATE SIXTENPG: Creates new member.
    Create Command Create Command Create Command