Just a question"
for a certain name-colunm 1 to 3 (AAA,BBB,CCC), once there is one of his score (column 5-column 7) not = 001, his name will be written to the out put file.
So the expected out put is:
Here's a DFSORT job that will do what I think you asked for:
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
* Get records with not = 001 in 5-7
* Sort on name
* Remove duplicates for each name
* Show name
Thanks you for your advice. But I am not understand.
The data I gave was just a part of the whole. Actually, For each certain Name, there will be 1 to 99 score for him, for instance, may be AAA have 3 scores, so he will have 3 records; for BBB, he be has 10 scores so there will be 10 records which column 3 to 10 is 'BBB', etc
What I sould do is :For a cartain Name, if not all of his score is = 001,
I will catch this Name and write it into the output file.
I gave you a job based on what you asked for. If you wanted something else, why didn't you say so in the first place? First you say the name is in 1-3 - now you seem to be saying the name is in 3-10. Which is it?
I think the job I gave you does what you want, although if the fields are not where you said they were in your first post, you'll need to change the control statements accordingly. Did you try that?
If you still need help, then please show a better example of the records in your input file and what you want for output, and explain clearly the "rules" for getting from input to output. What is the position, length and format of the name field? What is the position, length and format of the score field? What is the RECFM and LRECL of the input file?