This code works just fine if I just match on the first 4 characters of the field without any spaces.
SORT FIELDS=(091,15,CH,A,171,20,CH,A)
SUM FIELDS=NONE
OUTREC IFTHEN=(WHEN=(171,4,CH,EQ,C'WEST'),OVERLAY=(740:C'1')), -
IFTHEN=(WHEN=NONE,OVERLAY=(740:C'2'))
SUM FIELDS=NONE
OUTREC IFTHEN=(WHEN=(171,4,CH,EQ,C'WEST'),OVERLAY=(740:C'1')), -
IFTHEN=(WHEN=NONE,OVERLAY=(740:C'2'))
But if I want to match on 'WEST REGION' which has a space in it I get a syntax error on the outrec statement.
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'))
SUM FIELDS=NONE
OUTREC IFTHEN=(WHEN=(171,11,CH,EQ,C'WEST REGION'),OVERLAY=(740:C'1')), -
IFTHEN=(WHEN=NONE,OVERLAY=(740:C'2'))
What do I need to do to make it match the whole field regardless of spaces in it?