From the course: COBOL Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Sorting records in COBOL - COBOL Tutorial
From the course: COBOL Essential Training
Sorting records in COBOL
- [Narrator] Considering that COBOL is used extensively for writing reports. You can imagine that many of the reports require the data to be sorted. There are two types of sorting in COBOL. We have an external sort and an internal sort. The external sort is completed using the JCL. For this movie we will concentrate on the internal sort. Which uses the powerful SORT verb that can sort large amounts of data in the program. The data coming in can be sorted by a single field, or even by combining multiple fields can make a more complex key structure. Let's take a look at the flow of the sort. So if we wanted to sort records in a master file, we have our sortingStudents.cbl. We have our program, which takes in the master student file that is unsorted. It creates a temporary work file. That temporary work file is key. It is used to hold records while the sort process is in progress. And then finally we have our output file,…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.