In our indexed file, the primary key is the stock number. The program action that gets the next record takes a stock number as input, finds the record in the data file that has that stock number, and returns the next record found.
The program uses the the COBOL Entry Point field lnk-b-details as both an input and an output field, although on input lnk-b-stockno is the only part of lnk-b-details actually used. In our operation, we will use the same field to access the program action that gets the next record in the data file.