1. Unless you are using Unix System Services, 079083 cannot be a data set low-level qualifier. Every level of a data set name must start with a letter in z/OS.
2. Which 10-minute segment are you ignoring? The first digit of the minutes can be 0, 1, 2, 3, 4, or 5 -- which is 6 possible values yet you only want 5 you tell us.
3. Since a z/OS machine runs millions of instructions per second (depending upon the language used, it could be hundreds of millions), and you do not have a solution yet, WHY ARE YOU CONCERNED ABOUT EFFICIENCY? The only time you should EVER worry about efficiency on a mainframe is if (1) the code is in production, and (2) there is documented evidence that the code cannot execute within the appropriate time available.
4. As has been pointed out, simple nested loops will solve your problem effectively.