I want to split a file into three files based as shown below:
1) All Enrolled students (10,1,ch,eq,c'E')
2) Enrolled studs with science(9,1,ch,eq,c'S',and,10,1,ch,eq,c'E')
3) Enrolled studs with maths (9,1,ch,eq,c,'X',and,10,1,ch,eq,c'E')
There can be duplicate stud number in files and studs can be enrolled to Science and Maths.
I want to remove duplicates in each files based on stud number.
I wrote following sort statement:
But for some of the students who are enrolled to both science and maths are coming to only maths file. For these records the matchs records is before science record in file. As the student is enrolled in science as well I want to have this record in SORTFILB as well. If I give SUM FIELDS=NONE in outfil, it says invalid outfil operand. Is there any operand in outfil which can help to remove dups?
Thanks for your response!
Here when I sort on stud number and enrollement type, I am getting the student in both files for Science and Maths. So this is good.
But I am getting this student twice in only enrolled file (SORTFILA). I want one student only once in file.