Simple sort verb, COBOL Programming


The process of sequencing the records in some preferred manner is termed as sorting. The Sorting is done upon some key data item in the record. For illustration, consider the case of a pay roll file where each record consist all the essential information of an employee, like his name, identification number, address, department number, allowances, basic pay, deductions, etc.

Whenever a sequential file is to be sorted, its record exists on the file medium and can be accessed serially. In COBOL, there is no specific feature for the sorting of a table.

Though, its gives a sort verb which can be used to SORT a sequential file. In addition to sort verb, the MERGE verb can be used to merge various sorted files to create a new file containing the records of these files in the sorting order.

The sort verb such as many other COBOL verbs, then have various forms. This form is to be used when it is needed to sort a given input file. The simple sort verb needs the naming of three files - the unsorted input file, sorted output file and the work file. The format of the common SORT verb is as shown below:


Posted Date: 10/18/2012 1:07:37 AM | Location : United States

Related Discussions:- Simple sort verb, Assignment Help, Ask Question on Simple sort verb, Get Answer, Expert's Help, Simple sort verb Discussions

Write discussion on Simple sort verb
Your posts are moderated
Related Questions
Illustration of simple sort verb: Illustration: Suppose that we have a card file with the following records description in the data division. The names of the work fil

RULES OF MOVE VERB:  The Data movement is managed by the rules which are as shown below: (a) The contents of the identifier - 1 or the value of the literal - 1 is moved to

PROGRAM FOR PERFORM - VARYING: We have to write a program to elaborate PERFORM ...VARYING Identification division. Program- id. PerfVary. Environment division. Dat

Example of Special-names: Consider the illustration: Let the SPECIAL-NAMES paragraph be as shown: SPECIAL-NAMES. CHANNEL 1 IS PAGE-TOP. The Channel is related with the t

Valid and Invalid Word - Cobol words: Valid Word             Invalid Word & Reason emp-sal                  -pay   ( it starts with a hyphen)  TOTAL MARK (blank space em

MULTIPLY VERB:   The Multiply Verb causes one or more multiplicands to be multiplied by the multiplier and to store the products. The form of the MULTIPLY verb is as shown be

ROUNDED OPTION: Let us consider the DATA DIVISION entries which are as shown below: Now, subsequent to the execution of the statement ADD A B GIVING C, the C will hold

Illustration of if- else statement: IF OK-BALANCE NEXT SENTENCE ELSE MOVE 2 BALANCE-CODE In this illustration, the OK-BALANCE is a condition name. No action is specific if

ARITHMETIC VERBS: Most of the problems need some computations to be performed on the input or intermediate data that are numeric in nature. The Arithmetic verbs are used to pe

PROGRAM FOR PERFORM ...UNTIL We have to write a program to find the sum of "n" natural numbers. Identification division. Program- id. PerfUntil. Environment division.