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
How to print 10 to 1 if the input have only 10 digit number?
What is a scope terminator give example?
How to know whether the module is dynamical or statistical?
how to access the file from prodution from changeman tool and to submit a file to production
A table has two indexes defined. Which one will be used by the SEARCH?
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
What is the utilization of copybook in cobol?
What is link edit in cobol?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
How to use the same COBOL program in Batch and CICS on lines? explain with an example
What is the difference between perform … with test after and perform … with test before?
What is the Purpose of Pointer in the string?
i want a program using by if, evaluate , string, unstring, perform, occurs?