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


Example 9

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

  OPTION COPY
  OUTREC IFTHEN=(WHEN=(3,2,SS,EQ,C'FR,MX,GR'),
                  OVERLAY=(11:DATE=(DM4.),TIME1(.))),
         IFTHEN=(WHEN=(3,2,SS,EQ,C'CN,US,EN'),
                  OVERLAY=(11:DATE=(4MD/),TIME1(:)))

This example illustrates how you can use IFTHEN clauses with OUTREC to reformat different records in different ways.

For records with 'FR', 'GR' or 'MX' in positions 3-4, positions 11-20 of the reformatted output records are overlaid with a date of the form 'dd.mm.yyyy' and positions 21-28 are overlaid with a time of the form 'hh.mm.ss'. The data before positions 11-28 and after positions 11-28 are not affected.

For records with 'CN', 'US' or 'EN' in positions 3-4, positions 11-20 of the reformatted output records are overlaid with a date of the form 'yyyy/mm/dd' and positions 21-28 are overlaid with a time of the form 'hh:mm:ss'. The data before positions 11-28 and after positions 11-28 are not affected.

Since an IFTHEN clause with WHEN=NONE is not specified, records without 'FR', 'GR', 'MX', 'CN', 'US' or 'EN' in positions 3-4 are not changed.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014