z/OS DFSORT Application Programming Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example 15

z/OS DFSORT Application Programming Guide
SC23-6878-00

  SORT FIELDS=(1,2,CH,A)
  OUTREC FINDREP=(IN=C'*',OUT=C' ')

This example illustrates how you can replace a character with another character anywhere in FB or VB records.

The FB input records might look like this:
05 ***** JUNE ***************
02         * APRIL *
01* * * * DAISY * * * *
03BETTY ***********

We want to replace every asterisk with a blank. We use IN=C'*' to indicate we want to find each asterisk, and OUT=C' ' to indicate we want to replace it with a blank.

The sorted output records look like this:
01        DAISY
02           APRIL
03BETTY
05       JUNE

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014