JENISON187
Programmer
I NEED TO VALIDATE A DATA FIELD THAT CONTAINS A U.S. STATE. I NEED TO MAKE SURE THEY ENTER A VALID STATE BEFORE IT WRITES THE RECORD TO FILE. HOW CAN I DO THAT? CAN I USE
10 STATE-FIELD PIC X(002).
88 VALID-STATES VALUES 'MI','FL', ETC.
IF VALID-STATES
NEXT SENTENCE
ELSE
MOVE 'YOU MUST ENTER A VALID U.S. STATE'
TO MAP-MSG-DATA
I WOULD APPRECIATE SOME INSIGHT.
ERIC
10 STATE-FIELD PIC X(002).
88 VALID-STATES VALUES 'MI','FL', ETC.
IF VALID-STATES
NEXT SENTENCE
ELSE
MOVE 'YOU MUST ENTER A VALID U.S. STATE'
TO MAP-MSG-DATA
I WOULD APPRECIATE SOME INSIGHT.
ERIC