How do you sort in a COBOL program? Give sort file
definition, sort statement syntax and meaning.

Answers were Sorted based on User's Feedback



How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning...

Answer / kavya

As he told above we need to specify the sort-file in sd
entry.
But syntax is as follows,

SORT SORT-FILE ON ASCENDING/DESCENDING KEY
USING INPUT-FILE
GIVING OUTPUT-FILE.

We have to specifies the key to sort.
INPUT-FILE is the file to sorted.The sorted OUTPUT is sent
to the OUTPUT-FILE.

Is This Answer Correct ?    34 Yes 3 No

How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning...

Answer / guest

second ans is correct

Is This Answer Correct ?    15 Yes 3 No

How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning...

Answer / ram

THE ABOVE ONE IS CORRECT

Is This Answer Correct ?    7 Yes 1 No

How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning...

Answer / mftech

Need to define the SORT-FILE in SD in file section.

Sort SORT-FILE
Using Input-File
Giving Output-File

Can also use inout procedure and output ptocedure inplace
of input fiile and output files.

Is This Answer Correct ?    14 Yes 10 No

How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning...

Answer / subhashini

we can sort a cobol program define SD SORT-FILE in
FILE SECTION
THE SYNTAX IS
SORT SORT-FILE IN ASCENDING/DESCENDING KEY USING
INPUT-FILE GIVING OUTPUT-FILE.

Is This Answer Correct ?    8 Yes 5 No

How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning...

Answer / nagaraju

SORT SORT-FILE
ON ASCENDING/DESCENDING KEY key-value
USING input-file
GIVING output-file.

we can use input procedure and output procedure as fallow
SORT SORT-FILE
ON ASCENDING/DESCENDING KEY key-value
INPUT PROCEDURE IS --------
OUTPUT PROCEDURE IS -------.

Is This Answer Correct ?    4 Yes 2 No

How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning...

Answer / bhaskar reddy

This is the exam for the sort command:

SORT SORTFILE ON ASCENDING/DESCENDING KEY USING FILE1,FILE2
GIVING FILE3.

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More COBOL Interview Questions

Give some examples of command terminators?

0 Answers  


When would you use in-line perform?

2 Answers  


What was removed from COBOL in the COBOL II implementation?

0 Answers  


What is the use of intialize verb?

0 Answers  


How can I tell if a module is being called DYNAMICALLY or STATICALLY?

3 Answers   CTS,






I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSDS file in reverse order? In both the cases we donot know the total number of records.

2 Answers   L&T,


How is sign stored in a comp-3 field?

7 Answers  


What are subroutines ? and how do we pass data to the sub routines?

2 Answers   Xansa,


A paragraph PARA-X is to be executed when none of the data names A, B and C have value of 1. Which of the following will achieve this ? (a) IF A NOT = 1 OR B NOT = 1 OR C NOT = 1 PERFORM PARA-X (B) IF NOT A= 1 AND B= 1 AND C = 1 PERFORM PARA-X (C) IF A NOT =1 IF NOT B = 1 OR C= 1 PERFORM PARA-X (C) IF A NOT = 1 AND B NOT = 1 AND C NOT = 1 PERFORM PARA-X

3 Answers   TCS,


What is the significance of 'above the line' and 'below the line'?

2 Answers   Nokia,


is it possible to rename 01 level?

4 Answers  


How do you submit JCL via a Cobol program?

5 Answers   IBM,


Categories