Question on Data Validation
Hi
I just wanted to ask a question on Data Validation.
For example,If I have got an INPUT file on disk which
needs to be validated:
FD INPUT-FILE.
01 INPUT-RECORD.
03 IN-PART-NUMBER PIC X(6).
03 IN-QUANTITY PIC ?(4).
My detail line for printing looks something like:
01 P-DETAIL-LINE.
03 P-PART-NUMBER PIC X(6).
03 FILLER PIC X(5).
03 P-QUANTITY PIC ??(4).
Now the REQUIREMENT is IN-PART-NUMBER is alphanumeric and
IN-QUANTITY is numeric to be a valid value.
PROCEDURE DIVISION.
.
.
IF IN-QUANTITY NOT NUMERIC THEN
line 100 MOVE IN-QUANTITY TO P-QUANTITY
END-IF
.
.
Now I have tried using PIC "9" at the first "?" and
PIC "X" at the second "??"......is this a usual
practise ?
or does it depend on the compiler used.
Well the program runs PERFECT with me on my compiler Fujitsu v3..Now my
problem is
when I sent it to my teacher it came up with an ERROR:
"Non-numeric data at line 100" (They use MICRO FOCUS compiler)
Please any one tell me what shall I do to overcome this error. Do I need to
move IN-QUANTITY to a working storage first and then check for numeric
?..just guessing...
or am I doing something else wrong here ? please advise.
Best Regards
MS