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
In COBOL, what is the different between index and subscript?
Give some examples of command terminators?
how to refer the data field?
Can we change the password using ALTER? anyone tried and changed?
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
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 sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What are various search techniques in cobol? Explain.
how do you reference the esds vsam file formats from cobol programs
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
What is the difference between a binary search and a sequential search what are the pertinent cobol?
A table has two indexes defined. Which one will be used by the SEARCH?
What is cobol?