IBM Support

How do I limit which columns in a file the change command will check and only change the contents in those columns?

Question & Answer


Question

Limiting which columns in a file the change command will check and only change the content in those columns

Answer

You have 2 options.
1. Use bounds. If you type BNDS in the line command area, you can set bounds on the columns you want, using the characters.

Here's what it might look like:
=COLS> ----+----1---
=BNDS>
000001 add data
000002 add data
000003 add data
In this case, only columns 5-11 are used for FIND or CHANGE.
The documentation on boundaries is here:
Edit and Edit Macros Boundaries

  1. Use column numbers in the FIND or CHANGE commands. If I enter the command:

change 'a' 'A' 1 3 all

only the letter a in columns 1-3 are changed.

The documentation on the change command is here:
Edit and Edit Macros Change Primary Command

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSBLLD","label":"ISPF for z\/OS"},"Platform":[{"code":"PF035","label":"z\/OS"}],"Component":"","Version":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
29 July 2015

UID

dwa1205021