Joined: 25 Jun 2007 Posts: 196 Location: Bangalore
I think your requirement is to validate the PIC X(10) variable in which 3rd and 4th positions should be "ALPHABETIC" and remaining positions should be "NUMERIC". If yes, please check with the following code for your requirement.
77 WS PIC X(10) VALUE '07AB123456'.
IF WS(1:2) IS NUMERIC AND
WS(5:6) IS NUMERIC AND
WS(3:2) IS ALPHABETIC
DISPLAY 'NOT OK'