How to read records which is in sequential file in reverse
order ? Exp. 1 2 3 4 5 . i want 5 4 3 2 1?please clear my
doubt any one

Answer Posted / abhishek

@Rakesh You can define table occurs clause based on the No
of records that input file have.

All, You can reverse the file it self using external sort
before reading it.

Thanks,
Abhishek

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How you can characterize tables in cobol?

708


2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2088


What is the difference between comp and comp-3 usage?

669


In which area will you utilize 88 level items in cobol?

708


what is the difference between COBOL2 AND COBOL390?

2441






what is the use of outrecord?

1765


What is the difference between structured cobol programming and object alternativelyiented cobol?

746


What guidelines should be followed to write a structured cobol prgm?

662


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1103


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

10543


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

1221


How did the release of cobol/370 version 1.3 improve the performance of release 1.1?

634


how do you reference the printer file formats from cobol programs

647


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

648


What kind of error is trapped by on size error option?

733