How to read records from flat file in reverse order through
COBOL program?
Answer Posted / pa
Being a flat file, we cant be sure that it will have a unique key field. So, External to the cobol program , using SORT utility, we can add a serial no column, and then SORT it in descending order based on that column and read the file sequentially in COBOL program.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
What is the difference between goback, stop run and exit program in cobol?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
Which mode is used to operate the sequential file?
IF I mention stop run in CICS what happens?
When is inspect verb is used in cobol?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
What are the different types of condition in cobol and write their forms.
What is the difference between external and global variables in COBOL?
Explain how to differentiate call by context by comparing it to other calls?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
) How do u handle errors in BMS macro