Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Reformatting records with FINDREP z/OS DFSORT: Getting Started SC23-6880-00 |
|||
With the BUILD, FIELDS or OVERLAY parameter of the OUTREC statement, you reformat output records by specifying items that start at a specific position. But if you want to replace or remove data anywhere in your records, you would use the FINDREP parameter of the OUTREC statement instead. Suppose you had input records that looked like this:
You could use the following statements to replace all instances
of 'Goodbye' anywhere in the input records with 'Bye'.
FINDREP indicates that you want to do a find and replace operation. IN identifies the constant you are looking for (the "find" constant) and OUT identifies the constant you want instead (the "replace" constant). The output records produced by this OUTREC statement are:
You can use OUT=C'' (null constant) to remove identified constants.
For example, you could use the following statements to remove 'bye'
anywhere in the input records:
The results produced for this OUTREC statement using the input
records shown previously are:
You could use the following statements to change 'William' to 'Bill',
'Mike' to 'Michael', 'Dog' to 'Beagle' and '*' to '#' anywhere in
the input records:
INOUT identifies pairs of find and replace constants. The results produced for this OUTREC statement using the input
records shown previously are:
For complete details on find and replace, see z/OS DFSORT Application Programming Guide.
|
Copyright IBM Corporation 1990, 2014
|