by Robert Sample » Tue Oct 15, 2013 10:33 pm
Are you using the COBOL SORT verb? If not, what does "input procedure" mean to you?
If you are using SORT with an INPUT PROCEDURE, why not just add another variable under the SD 01 level that has a sequence number of the appropriate size [that is, PIC 9(?)], define a WORKING-STORAGE counter to increment, and move the counter to the SD variable in the INPUT PROCEDURE?