Efficient Data Processing

Hello. I am trying to modify an existing COBOL program that reads in data (all 100K+records) then moves that data into a sort file for processing. I would like to only process (sort) those records that meet a certain criterion. My understanding is this will make my program execute faster therefore making it more efficient. Currently the program reads all records then eliminates those records which meet the criteria. I am new to COBOL programming and am not sure what information to include to get helpful feedback.

100k records not that much for COBOL program running on ZOS. There not much you can do, and generally not worth the effort. How long this program takes to run to run?

Approximately 30 seconds.

WTH, changing a batch program that runs 30 seconds is not worth your time. Reading record sequentially to selecting them for sort is what you would do in 90% of COBOL programs.

Thank you. I am new to “professional” programming. I guess with time I can get beyond just successful and include concise, efficient, and future friendly.