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

How do you fetch current date in normal cobol pgm and in cobol-db2 pgm?

3 Answers   Cap Gemini, CTS,


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

0 Answers  


What is difference between comp & comp-4?

6 Answers  


How you can read the file from bottom?

0 Answers  


What will happen if you code GO BACK instead of STOP RUN in a stand-alone COBOL program i.e. a program which is not calling any other program ?

3 Answers  






can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

0 Answers  


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

0 Answers  


What is an index for tables?

2 Answers  


How many bytes do a s9 (7) comp-3 field occupy?

1 Answers  


wht is the diff b/w if and evaluate stmts ?

2 Answers   DELL,


Explain how you can characterize tables in cobol?

0 Answers  


The maximum number of dimensions that an array can have in COBOL-85 is ?

11 Answers  


Categories