Simple sort verb, COBOL Programming

THE SIMPLE SORT VERB:

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
WRITE STATEMENT: The records are written to be logical place as determined from the value of the record key. The INVALID KEY condition occurs in the cases shown below: (i)

Example of condition names: The illustration below is of the use of the condition names  77  MARITAL-STATUS     PIC    9   88  SINGLE    VALUE    IS     ZERO   88  MA

PROGRAM FOR INVENTORY  We have to write a program to update the inventory file. Consider 2 files,viz, invfile an tranfile. Invfile has 3 fields pno,name,qty. Tranfile has 3 fil

Second form of Divide verb: The second form of this verb is as shown below: In this situation the identifier-1 or numeric- literal-1 will be divided by identifier-2 or

ADD and SUBTRACT CORRESPONDING: The CORRESPONDING option can also used with the ADD and SUBTRACT verbs. The following are some of the formats of these verbs with the CORRESPON

Illustration of Subtract verb: (a) SUBTRACT A FROM B. This illustration means that the value of A will be subtracted from the value of B and the subtracted result will be s

Write a COBOL IF sentence to use the values of numeric variables EXAM and COURSEWORK , both assumed to be with format PIC 999 and in the range 0 to 100 and to move the value:

Illustration of indexed tables: Index items defined through the INDEXED phrase of the OCCURS clause are one type of indexes. There can be other type of index items that are de

OCCURS - INDEXED BY PROGRAM: identification division. program- id. searching. environment division. data division. working-storage section. 01 table1.      0

MOVE CORRESPONDING: It is frequently required to move some of the data items of one group to some other data items in the other group. If the names of the equivalent data item