Mainframestechhelp
  • Home
  • What is?
    • Mainframe
  • Tutorials
    • TSO
    • ISPF New
    • COBOL
    • JCL
    • DB2
    • VSAM
    • CICS
    • IMS DB
    • GDG
  • Utilities
    • IDCAMS
    • IEBCOPY
    • IEBGENER
    • SORT or DFSORT
    • ICETOOL
    • IEFBR14
    • IKJEFT01
  • Examples
    • COBOL
    • JCL
    • DB2
    • VSAM
    • SORT or DFSORT
    • IDCAMS
    • IEBGENER
    • IEBCOPY
    • ICETOOL
    • IEFBR14
  • Short Notes
    • COBOL
    • JCL
  • Interview Questions
    • COBOL
    • JCL
    • DB2
    • VSAM
    • CICS
    • IMS DB New
    • PL/I New
  • Tools
    • SDSF
    • QMF New
  • COBOL
  • JCL
  • DB2
  • VSAM
  • CICS
  • IMS DB
  • TSO
  • ISPF
  • GDG
ISPF Tutorial Topics
  • ISPF Tutorial Home Page
  • Introduction
  • Interacting with ISPF
  • ISPF Settings Panel
    (Option 0)
  • ISPF Utilities Panel
    (Option 3)
  • ISPF Library Utility
    Panel (Option 3.1)
  • ISPF Data Set Utility
    Panel (Option 3.2)
    • ISPF Create PS
    • ISPF Create PDS
    • ISPF Uncatalog Datasets
    • ISPF Catalog Datasets
    • ISPF Rename Datasets using 3.2
    • ISPF Delete Datasets using 3.2
  • ISPF Move | Copy Panel
    (Option 3.3)
  • ISPF Data Set List
    Utility Panel
    (Option 3.4)
    • ISPF Dataset List (DSLIST) Actions
    • ISPF List Datasets
    • ISPF Filtering Search for DataSet
    • ISPF Create PDS Member
    • ISPF Member Actions for PDS
    • ISPF PDS member Management
    • ISPF Member List Statistics
    • ISPF Command Line Fields for Member List
    • ISPF PS File Management
  • ISPF Command Shell
    (Option 6)
    • Send file to Mainframe Server
    • Receive file from Mainframe Server
  • ISPF SuperCE Utility
    (Option 3.13)
  • ISPF Search-For Utility
    (Option 3.14)
  • ISPF Extended Search-For
    Utility (Option 3.15)
  • ISPF Editor
    • ISPF Primary Commands in Edit or Browse or View modes
    • ISPF Data Manipulation Commands
    • ISPF Labels
    • ISPF Scrolling Options
    • ISPF Edit User Profile
    • ISPF Find Command
    • ISPF Change Command
  • ISPF Change Command

    The CHANGE (C) command is used in the Edit mode to replace a specific string or pattern within a dataset or member. This command is particularly useful for editing large datasets where manual changes would be time-consuming.

    Key Features -

    • String Replacement: Replaces one string with another throughout a dataset or within a specified range.
    • Flexible Search Criteria: Specify column ranges, case sensitivity, or labels to restrict the change scope.
    • Global Changes: Replace multiple occurrences in one execution.
    • Undo Support: Changes can be undone using the UNDO command if SETUNDO is enabled.

    Syntax -

    C 'old-string' 'new-string' [range] [column-range] [options]

    Parameters -

    Parameter Description
    old-string The string to be replaced.
    new-string The string to replace with.
    range Specifies the line range (e.g., .A .B for label range, or 5 10 for line numbers).
    column-range Restricts the change to specified columns (e.g., 10 20).
    options Additional flags like FIRST, ALL, PREFIX, SUFFIX, WORD, CHAR, etc., to refine the search.

    Common Options -

    • FIRST: Changes only the first occurrence in each line.
    • ALL: Changes all occurrences in the specified range.
    • PREFIX: Matches strings that start with the specified string.
    • SUFFIX: Matches strings that end with the specified string.
    • WORD: Changes only complete words that match the old-string.
    • CHAR: Allows changes of substrings (default behavior).

    Examples -

    Scenario - Change "HELLO" in the program to "HI".
    Change Command The changed line highlighted in red from first 1 to 6 columns and cursor will be placed after the first changed text.
    Change Command

    More Examples -

    CommandFunction
    C 'OLD' 'NEW' Replaces the first occurrence of OLD with NEW in each line of the dataset.
    C 'OLD' 'NEW' ALL Replaces all occurrences of OLD with NEW in the entire dataset.
    C 'DATA' 'INFO' 5 10 Replaces DATA with INFO between lines 5 and 10.
    C C'TEST' 'EXAM' Replaces TEST with RESULT within columns 1 to 20 in all lines.
    C 'ERROR' 'SUCCESS' .A .B Replaces ERROR with SUCCESS in the lines between labels .A and .B.
    C PREFIX'ABC' 'XYZ' Replaces strings starting with ABC with XYZ.
    C SUFFIX'END' 'FINISH' Replaces strings ending with END with FINISH.
    C P'.' X'00' Change all invalids to hex X'00'.
    C ALL 73 80 P'=' " " Blank out everything in cols 73-80.
    C ALL P'-' 1 10 "0" Change all non-numeric chars to '0' in cols 1-10
    C ALL P'#' " " 20 25 Changes all numeric character between column 20 to 25

    About
    • About Us
    • Careers
    • Privacy policy
    • Terms and conditions
    • Helping
    • Contact Us
    FOLLOW US

    2014 - 2025 Mainframestechhelp. All Rights Reserved.