UNSTRING DELIMITED WITH POINTER OPTION

UNSTRING DELIMITED WITH POINTER OPTION The following COBOL program depicts the use of  UNSTRING DELIMITED WITH POINTER OPTION        01 WS-DATE       PIC X(10) VALUE ‘2011-01-15’.           05 WS-YYYY PIC 9999 VALUE 2010.           05 WS-MM   PIC 99   VALUE 12.           05 WS-DD   PIC 99   VALUE 31.        01 WS-DELIM   PIC X    VALUE ‘-‘.       ** USING WITH POINTER WE CAN ONLY MOVE THE MONTH AND DATE FIELDS       ** THE YEAR WILL REMAIN UNCHANGED              UNSTRING WS-DATE  DELIMITED BY  ‘-‘              DISPLAY ‘RESULT OF UNSTRING COMMAND :-‘ WS-DATE-FORMATTED. The output of the program is  RESULT OF UNSTRING COMMAND :-20100115