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
IF I mention stop run in CICS what happens?
What is inspect in cobol ?
What is the difference between goback, stop run and exit program in cobol?
What rules are to be followed while using the corresponding options?
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
Define static linking and dynamic linking.
Explain what you understand by passing by value.
What is the compute verb? How is it used?
What is a report item?
What is a scope terminator give example?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
What is the use of intialize verb?
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
What are various search techniques in cobol? Explain.