How to read records from flat file in reverse order through
COBOL program?
Answer Posted / dimpy19
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=YOUR INPUT DATASET,DISP=SHR
//SORTOUT DD DSN=YOUR OUTPUT FILE IN REVERSE ORDER,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(CYL,(X,Y),RLSE)
//SYSIN DD *
INREC FIELDS=(1,80,SEQNUM,8,ZD)
SORT FIELDS=(81,8,ZD,D)
OUTREC FIELDS=(1,80)
/*
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Explain about different table spaces.
HOw can I get the negative sign while deduct high value from low value
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
What is the difference between Call and a Link?
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
What is difference between static and dynamic call in cobol?
What is redefines clause in COBOL?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
What is length is cobol?
) how do u code after getting data?
How to remove 2 duplicate records and copy only one using job control language?
Difference between array and sub-script ?
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
What is the difference between binary search and sequential search?
What are the different data types in cobol?