----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
//SYSIN DD *
SORT FIELDS=(091,15,CH,A,171,20,CH,A)
SUM FIELDS=NONE
OUTREC IFTHEN=(WHEN=(171,11,CH,EQ,C'WEST REGION'),OVERLAY=(740:C'1')),
IFTHEN=(WHEN=NONE,OVERLAY=(740:C'2'))
//*
//*********************************************
//* END OF SORT1
//*********************************************
//SYSIN DD *
SORT FIELDS=(091,15,CH,A,171,20,CH,A)
SUM FIELDS=NONE
OUTREC IFTHEN=(WHEN=(171,11,CH,EQ,C'WEST REGION'),OVERLAY=(740:C'1')),
IFTHEN=(WHEN=NONE,OVERLAY=(740:C'2'))
//*
//*********************************************
//* END OF SORT1
//*********************************************