I have to validate the input file(Variable block) and write the invalid(non numeric) records to output file1 and valid records to output file2. Here in the invalid records file i have to say why the records are invalid.
For example input file has 5 fields say
Employee num,salary,date of joining,date of leaving,Branch
Employee Num - PIC X(5)
Salary - numeric-PIC 9(12)V9999
Date of joining -PIC X(10)
date of leaving - PIC X(10)
Branch - X(5)
Now i want to validate each and every field in put file,for example say the salary field is having invalid record(40.00000-its non numeric,i will put the check for salary filed as nonnumeric) then i have to write the records into output file(all the five fileds should be written in the output file),so as per our example the output filed should contain 34567 40.0000 2013-01-01 2013-04-01 txdce and at the end of record it should say salary filed is invalid.If 2 fields are invalid says salary and date then at the end of file it should say salay and date of joining are invalid.