Updating records in a data set

The following example searches every member of the partitioned data set FMNUSER.TESTPDS for records that contain both “JAMES” (starting at column 6) and “BROWNE” (starting at column 20), then changes “JAMES” in those records to “JIMMY”.

⋮
$$FILEM DSU DSNIN='FMNUSER.TESTPDS',
$$FILEM  MEMBER=*,
$$FILEM  PROC=*
if fld(1,5) == 'JAMES' & fld(20,6) == 'BROWNE' then
   CHG_OUT('JAMES', 'JIMMY', 0)
/+
⋮