what are the steps to sort in a cobol program?

Answers were Sorted based on User's Feedback



what are the steps to sort in a cobol program?..

Answer / snehatechm

sort file-1 on ascending/descending key using file-2 giving
file-3

file-1 is the work file and it should be defined in SD
file-2 is the input file and it should be defined in FD
file-3 is the output file and it should be in FD.

Is This Answer Correct ?    15 Yes 0 No

what are the steps to sort in a cobol program?..

Answer / vaneesh

SORT WORK-FILE ON
ASCENDING KEY AS WS-KEY1
DESCENDING KEY WS-KEY2
USING INPUT-FILE GIVING OUTPUT-FILE.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More COBOL Interview Questions

I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

0 Answers   HCL,


If we use GO BACK instead of STOP RUN in cobol?

1 Answers   Temenos,


What are the different open modes available in cobol?

0 Answers  


What are the divisions in a cobol program? Which one is the mandatory division among them?

1 Answers  


I have a files containing both duplicate and non-duplicate records.The file is already sorted by a key.I want to determine those records that are duplicate and records that are non-duplicate.If duplicate the record is move to a duplicate file and if non-duplicate that will be move to valid file.thank you

1 Answers  






plz,could any one tell me? what about EBCDIC in cobol?briefly?

1 Answers  


What is the usage of comp fields in cobol?

0 Answers  


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

0 Answers  


when COMP-3 is preferrable?

3 Answers   Patni,


The following entries appear in the WORKING-STORAGE SECTION: 01 DATE-TODAY. 05 YY PIC XX VALUE "90". 05 MM PIC XX VALUE "12". 05 DD PIC XX VALUE :31". 01 DATE-EDIT PIC XX/XX/XX. MOVE DATE-TODAY TO DATE-EDIT. (a) 901231 (b) 90/12/31 (c) 31/12/90 (d) 311290

4 Answers   TCS,


What are the different data types available in COBOL?

4 Answers  


What is the difference between working storage copybook and linkage section copybook?

5 Answers   TCS,


Categories